Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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