Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a task to filter around 250 rows of accounts. My solution would be to pass multiple criterias in a SWITCH( TRUE() statement.
The problem here is that i have to pass a LOT of criterias, because i need to exclude a lot of accounts in between the ones i want to include. Does anyone know a better solution to this task?
The alternative would be to use Joins.
For example, to demonstrate filtering with switch in sql
filtering with joins in sql
You need to do the same thing in DAX by building a table that is representative of the SWITCH condition and usr that to filter fact table.
but wouldn't you need to make the individual criterias still?
The only different i would notice in DAX table is that i can use DAX to just click and choose instead of writing the statements. Is that what you mean?
An example from my solution looks like this:
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |