cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors