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,
I am trying to filter a visual based on two fields but at the moment once the first one is applied the 2nd is restricted.
I want the table to list values when either SOS = 22/23 OR PC = 22/23
At the moment once a select the first then the second is select is reduced.
These are Dax calender tables.
Any help is much appricated.
Thank You
Solved! Go to Solution.
Here is one way. Create duplicates of the tables and leave them unrelated in the model. Use the fields of these unrelated tables as the slicers.
Then create the equivalent measure to use as a filter for the visual, setting the value to 1:
Filter Table =
SWITCH (
TRUE (),
AND (
ISFILTERED ( PC ),
MAX ( 'Table'[PC Format] ) IN VALUES ( PC[PC Format] )
), 1,
AND (
ISFILTERED ( SOS ),
MAX ( 'Table'[SOS Format] ) IN VALUES ( SOS[SOS Format] )
), 1,
AND ( NOT ( ISFILTERED ( PC ) ), NOT ( ISFILTERED ( SOS ) ) ), 1
)
I've attached a sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
Can you try again? I actually edited the post and you may have tried while I was editing it
EDIT: I just tried the download and it works for me
Proud to be a Super User!
Paul on Linkedin.
Here is one way. Create duplicates of the tables and leave them unrelated in the model. Use the fields of these unrelated tables as the slicers.
Then create the equivalent measure to use as a filter for the visual, setting the value to 1:
Filter Table =
SWITCH (
TRUE (),
AND (
ISFILTERED ( PC ),
MAX ( 'Table'[PC Format] ) IN VALUES ( PC[PC Format] )
), 1,
AND (
ISFILTERED ( SOS ),
MAX ( 'Table'[SOS Format] ) IN VALUES ( SOS[SOS Format] )
), 1,
AND ( NOT ( ISFILTERED ( PC ) ), NOT ( ISFILTERED ( SOS ) ) ), 1
)
I've attached a sample PBIX file
Proud to be a Super User!
Paul on Linkedin.
Thank you,
I tried to downloand the file but that doesn't seem to work, are you able to reupload it?
I'm unable to call the date table as they are Dax tables
@Anonymous , You need to create measures for that
example
countrows(filter(Table, Table[SOS] = "22/23" || Table[PC] = "22/23"))
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |