Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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 @ppatil ,
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 @ppatil ,
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.
@ppatil ,
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
76 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |