Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Ignoring the slicer in measure

I am building a test/control dashboard.

I have pre/post-test and pre/post control. The Visuals for the Control are disconnected from the slicers so they always show the same growth.

If there is nothing selected in my slicers I get all the correct numbers. When I slice, it filters my control measure but I don't want it to.

 

Here is an example

 

Overall Test is 20 post, 10 pre so 100% growth

Control is 15 post, 10 pre so 50% growth.

The change is 100-50 so 50%.

Now I want to look at a specific store. That store was 6 post, 4 pre, so 50% growth.

I want me difference measure to still to 50-50 so 0. Instead, my control 0s out and it still shows 50.

 

Can someone help me with Dax that will ignore the slicer values? Thanks
I tried the below query, but it doesn't display the correct output.

_inc_exams_test_ctrl = (((7 *
CALCULATE(AVERAGE(Tele_Health[Qtyexamcompre]),FILTER(Tele_Health,AND(Tele_Health[Period] = "Post-Period",Tele_Health[Store_Type] = "Test Store"))))/CALCULATE(AVERAGE(Tele_Health[Avg_Pre_Exams]),FILTER(Tele_Health,Tele_Health[Store_Type] = "Test Store")))-1)
-
(((7 *
CALCULATE(AVERAGE(Tele_Health[QtyExamCompre]),FILTER(Tele_Health,AND(Tele_Health[PERIOD] = "Post-Period", Tele_Health[Store_Type] = "Control Store")),REMOVEFILTERS(Tele_Health[storenumber]))/
CALCULATE(AVERAGE(Tele_Health[Avg_pre_Exams_CONTROL]),FILTER(Tele_Health,Tele_Health[Store_Type] = "Control Store"),REMOVEFILTERS(Tele_Health[storenumber])))-1))
2 ACCEPTED SOLUTIONS
ahmedoye
Resolver III
Resolver III

@Anonymous , becuase you measure is very long, you can just write a new one that is like
Final Measure = CALCULATE(_inc_exams_test_ctrl ,
                                             REMOVEFILTER(TheColumnInTheSlicer))

View solution in original post

Anonymous
Not applicable

Thank you so much Ahmed. It worked like a charm. 

View solution in original post

3 REPLIES 3
ahmedoye
Resolver III
Resolver III

@Anonymous , becuase you measure is very long, you can just write a new one that is like
Final Measure = CALCULATE(_inc_exams_test_ctrl ,
                                             REMOVEFILTER(TheColumnInTheSlicer))

Anonymous
Not applicable

Thank you so much Ahmed. It worked like a charm. 

Anonymous
Not applicable

If you want a measure to ignore slicers you need to use the ALL and its family of functions within your calculate statement.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors