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

Caluclate Sum Filter DAX not Filtering in report

I have the following

Source Use Gain Production = CALCULATE(sum('Business Crop Schedule'[Value]), FILTER(ALL('Business Crop Schedule'[Sub Type]), 'Business Crop Schedule'[Sub Type]="Production Number")) though when selecting a filter on the report it is not updating the values, instead of 6447 in this case it should read 0. How do i write the measure so these values are updating when also filtering in the report thanks

 

sustainhort_0-1678599994723.png

 

 

3 REPLIES 3
tamerj1
Super User
Super User

Hi @sustainhort 
Please try

Source Use Gain Production =
CALCULATE (
    SUM ( 'Business Crop Schedule'[Value] ),
    FILTER (
        VALUES ( 'Business Crop Schedule'[Sub Type] ),
        'Business Crop Schedule'[Sub Type] = "Production Number"
    )
)

or

Source Use Gain Production =
CALCULATE (
    SUM ( 'Business Crop Schedule'[Value] ),
    KEEPFILTERS ( 'Business Crop Schedule'[Sub Type] = "Production Number" )
)
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your datamodel looks like, but I assume the column that you want to filter inside the measure is sorted by another column. If my assumption is correct, please try inserting that column as well into the measure.

Source Use Gain Production =
CALCULATE (
    SUM ( 'Business Crop Schedule'[Value] ),
    FILTER (
        ALL (
            'Business Crop Schedule'[Sub Type],
            'Business Crop Schedule'[Sub Type Index number]
        ),
        'Business Crop Schedule'[Sub Type] = "Production Number"
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Hi thanks for replying, it is filter from another data table what would be the workaround for that cheers

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