How to make two parameters dependent in tableau - filter

I need to make one of my parameter filter dependent on other parameter filter. Is there any way to acheive it?

What do you mean by 'dependent'? You could:
Create Parameter #1
Create Calculated Field #1 to reference P1
Create Parameter #2, uses Calculated Field #1
Create Calculated Field #2 to filter based on Parameter #2
While this is possible, I am struggling to find a business scenario. In most dashboards, I over-engineered to get to this solution, and ended up throwing it out after finding a simpler solution.

Related

Best practices for implementing Calculated Fields?

I would like to get some advise on the best practices regarding implementing calculated fields in the schema.
Typical e.g.:
Class ABC contains fields: Field1...Field10
Field1...Field5 are 'static' fields.
Field6 = some operation(Field1,Field2)
Field7 = some operation(Field3,Field6)
Field8 = some operation(Field1,Field5,Field6,Field7)
Now, every time a create/update operation is done on any/all of Field1...Field5, fields Field6...Field10 need to be updated, in order.
What is the best (most efficient) practice to achieve this?
Also, is there some way (or on the Parse roadmap) to implement
Calculated fields in the Dashboard itself? And determine the formulas
there itself, while defining a field?
^ This has become sort of the prevalent way of defining Calculated fields in most modern database/database abstraction tools.
Hard coding every formula to detect a field/fields change, while maintaining the correct order of updates for the calculated fields seems to be too gargantuan a task for modern times.
Any advise on this is most appreciated!
Thanks.

Is it possible to have a constant value in a calculated field in QuickSight?

In QuickSight, when you want to define a constant value to reuse it in visualizations later, you can try to set it as:
Calculated field: goalFor2020
Formula: 20000
But right now it doesn't allow you to put just a number in the formula.
Is there any way to do achieve having just a number in the formula of a calculated field?
The reason we need it is just to have a number that doesn't depend on any data, just manually defined by us.
Interesting, QuickSight lets me insert a number into a calculated field, just fine.
Since that isn't working for you, I'd recommend using a parameter with a default value. For example,
Parameters essentially has the same "rights" as a calculated field (it can be used in visuals, other calculated fields, etc...). It can also be passed via query parameters which may or may not be a feature that you'd find useful.
Another cool benefit of using parameters is that, if you're embedding QuickSight, you could retrieve this value dynamically and pass it to the dashboard. Then if you wanted to, say, generalize your for different yearly goals, the goal could be passed and dynamic (rather than hard-coded in a calculated field).
We could achieve it with a trick, just apply some function that returns a number to one of your columns, and make it 0, then add your constant number:
Calculated field: goalFor2020
Formula: count(email) * 0 + 20000
It does the trick, but there might be a better way to do it.
I have tried something like this:
distinct_countIf({dimension},{dimension}='xxx')*
+distinct_countIf({dimension},{dimension}='xxx')*
just makes the discount_countif meet the requirement, so it will return to 1. And use 1* the number you want to hardcode. If the requirement does not meet, it will return 0 so it won't add up the number

Want to implement logic in datastage other than Aggregator stage

I want to implement this logic other than aggregator stage, basically through transformer stage to merge these records based on the ID column, and there is no possibility to get multiple values for same field in my case for same ID column.
I have this input data,
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|0|0|1000|0|0
10001|0|10|0|0|1200|0
10001|0|0|11|11|0|10500
and i want my output to be like:
ID|VAL1|VAL2|VAL3|BAL1|BAL2|BAL3
10001|5|10|11|1000|1200|10500
Is it possible to implement it and if, then thanks in advance!!!!
There are at least two options to do that:
Using the loop within the transformer
Storing the data of the previous row (with the help of stage variables) until LastRowInGroup
Some common things are
get the data sorted upfront the transformer
Use LastRowInGroup to use it as output constraint
remember that the stage & loop variables are processed top down so the sequence matters and enables one to point to an old (previous) content when referring to a variable further down from above
Be aware that this a little advanced - the aggregator would be probably the easier solution.

Informatica cloud: use field in pre/post sql commands

I am trying to delete a set of data in the target table based on a column (year) from the lookup in IICS (Informatica Cloud).
I want to solve this problem using pre/post sql commands but the constraint is I can't pass year column to my query.
I tried this:
delete from sample_db.tbl_emp where emp_year = {year}
I want to delete all the employees in a specific year i get from lookup return
For Ex:
I got year as '2019', all the records in table sample_db.tbl_emp containing emp_year=2019 must be deleted.
I am not sure how this works in informatica cloud.
Any leads would be helpful.
How are you getting the year value? A pre/post SQL may not be the way to go unless you need to do this as part of another transformation, i.e., before or after the transformation runs. Also, does your org only have ICDI, or also ICAI? ICAI may be a better solution depending on the value is being provided.
The following steps would help you achieve this.
Create an input-output parameter in your mapping.
Assign the result of your lookup in an expression transformation to the parameter using SetMaxVariable
Use the parameter in your target pre SQL as
delete from sample_db.tbl_emp where emp_year = $$parameter
Let me know if you have any further questions

How to filter one column using other in obiee?

I use OracleBI 12c. We had to create a analysis. Let's say we need to show all the clients with account code starting with '202%' and at the same time we should check if that client also has account_code starting with '226%' . If they have then show them, else don't.
It may sound simple, but all filter options I tried didn't give the wanted output. Also I tried to use selection steps but didn't succeed either.I could have done that using FILTER in Column formula, but since the column is not a measure attribute it throws error 'Filter funciton requires at least one measure attribute in its first argument'.
Have somebody had this kind of issue?

Resources