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
Steph_Piret
Frequent Visitor

Calculate function does not seem to lift the filter it is supposed to lift

Hello Everyone,

I don't understand why the result of this "calculate" formula only shows when the filter is applied. I thought it was supposed to repeat the same constant on all the rows from the table. Has someone an idea?

 

I would like to repeat the "GRP" from the North next to the "GRP" results of all the other targets.

 

I've build this formula :

GRP MAT North =
CALCULATE([Monthly GRP Views MAT], FILTER(Targetlist, Targetlist[Target]="North"))
 
The result is ok :  GRP MAT North = GRP MAT when the target filter is "North" BUT the result does not appear on the other rows for some reason:
 
Steph_Piret_1-1630590323365.png

thanks a lot for helping

1 ACCEPTED SOLUTION
Steph_Piret
Frequent Visitor

I found a solution : it works if I use "allselected", like suggested in this other post:

Solved: calculate function - Microsoft Power BI Community

 

Thank you for making me think of "all" anyway!

 

View solution in original post

4 REPLIES 4
Steph_Piret
Frequent Visitor

I found a solution : it works if I use "allselected", like suggested in this other post:

Solved: calculate function - Microsoft Power BI Community

 

Thank you for making me think of "all" anyway!

 

Jos_Woolley
Solution Sage
Solution Sage

It does for me using the data you provided, though perhaps you could confirm the definition for your Monthly GRP Views MAT measure? Failing that, you can either upload your workbook or, if that's not possible (e.g. due to confidentiality reasons), it should be fairly easy for you to create a small, mocked-up version which uses dummy data and upload that.

Regards

Jos_Woolley
Solution Sage
Solution Sage

Hi,

GRP MAT North =
CALCULATE ( [Monthly GRP Views MAT], Targetlist[Target] = "North" )

which is equivalent to:

GRP MAT North =
CALCULATE (
    [Monthly GRP Views MAT],
    FILTER ( ALL ( Targetlist[Target] ), Targetlist[Target] = "North" )
)

Regards

Thanks but unfortunately it does not change the result I get ...

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