Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
Can i one of two filters based on code?
Say like if the colour is orange filter by orange table column values but if green then use anoth filter completely?
Any help much appretiated
Andy
Solved! Go to Solution.
Hi @Anonymous ,
Try something like this as per your requirement and data:
Measure= IF(SELECTEDVALUE(TABLE(VALUE))=1, CALCULATE (SUM(Column), filter expression1), CALCULATE (SUM(Column), filter expression2
))
Mark this as a solution if I answered your question. Kudos are always appreciated.
Thanks
Hi
OK, wasn't very explicit, sorry. If you have a tabular model dataset that has 2 tables in it that can be used for filtering, each with its own data that joins to a different column, in a paginated report I need to create DAX queries that will use one or other of the 2 tables, but not both. The 2 don't form a hierarchy, so I can't use it that way. Filtering will be driven by a combination of data and user selection of parameters. This can be achieved fairy easily in SQL, but I need to do it in DAX, it would be sort of like an if value = 1 then use 1 filter if not use the other, which I have tried in DAX and it just errors with a syntax error, in SQL I would use a case statement in the where clause, but I don't know how to do the same in DAX
Any help, much appreciated
Regards
Andy
Hi @Anonymous ,
Try something like this as per your requirement and data:
Measure= IF(SELECTEDVALUE(TABLE(VALUE))=1, CALCULATE (SUM(Column), filter expression1), CALCULATE (SUM(Column), filter expression2
))
Mark this as a solution if I answered your question. Kudos are always appreciated.
Thanks
Hi @Anonymous ,
Yes, you can use two filters.
But I didn't quite understand your question.
Can you please give us an example.
Thanks
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |