Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Community..!!
I want to write a DAX to switch between one measure to another in the Matrix Visual.
Please refere the below image.
Slicer
Matrix Visual
When I select Average in the slicer then it should show only Average in the Matrix , When I select Number in the slicer then it should show only Number in the Matrix and When I select Select all option in the slicer then it should show both Average and Number in the Matrix.
Could u please help me to do that?
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, I create a sample, only the values can be filtered by the slicer but the title can't.
Here's my solution.
Average =
IF (
SELECTEDVALUE ( Slicer[Slicer] ) IN { "Average", "Select-all" },
AVERAGE ( 'Table'[Sales] ),
BLANK ()
)
Number =
IF (
SELECTEDVALUE ( Slicer[Slicer] ) IN { "Number", "Select-all" },
COUNT ( 'Table'[Sales] ),
BLANK ()
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, I create a sample, only the values can be filtered by the slicer but the title can't.
Here's my solution.
Average =
IF (
SELECTEDVALUE ( Slicer[Slicer] ) IN { "Average", "Select-all" },
AVERAGE ( 'Table'[Sales] ),
BLANK ()
)
Number =
IF (
SELECTEDVALUE ( Slicer[Slicer] ) IN { "Number", "Select-all" },
COUNT ( 'Table'[Sales] ),
BLANK ()
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Calculation groups should help you for this scenario. You can try to create calculation groups for your scenarion by following the steps mentioned in the following blog post.
https://data-mozart.com/mastering-dp-500-exam-creating-calculation-groups/
Thanks,
Arul
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!