Forum Discussion
Calculation is not producing the correct figure
- 1 year ago
Just ignore this. I think I've figured out why.
CALCULATE ( SUM ( 'consolidated'[value] ), 'Consolidated'[Financial] = "Commitment" )This part of the formula
'Consolidated'[Financial] = "Commitment"is internally translated to
FILTER(ALL(Consolidated[Financial]), Consolidated[Financial] = "Commitment")which filters all rows where Financial is "Commitment" and applies this filter across the entire Consolidated[Financial] column. Therefore, unless the filter originates from a different column, the result remains consistent regardless of the value selected in Consolidated[Financial].
Change it to
CALCULATE ( SUM ( 'consolidated'[value] ), KEEPFILTERS ( 'Consolidated'[Financial] = "Commitment" ) )
hi SamfarUK
How are those measures being calculated? Can you please post a workable sample data that is not an image? Make sure to include all the necessary columns as the ones in your slicer are simply the values and the PO Number. You may post al link to a sanitized copy of your pbix or an Excel file stored in the cloud.
Just ignore this. I think I've figured out why.
CALCULATE (
SUM ( 'consolidated'[value] ),
'Consolidated'[Financial] = "Commitment"
)
This part of the formula
'Consolidated'[Financial] = "Commitment"
is internally translated to
FILTER(ALL(Consolidated[Financial]), Consolidated[Financial] = "Commitment")
which filters all rows where Financial is "Commitment" and applies this filter across the entire Consolidated[Financial] column. Therefore, unless the filter originates from a different column, the result remains consistent regardless of the value selected in Consolidated[Financial].
Change it to
CALCULATE (
SUM ( 'consolidated'[value] ),
KEEPFILTERS ( 'Consolidated'[Financial] = "Commitment" )
)
- SamfarUK1 year ago
Helper I
That has worked! 😄 Thank you so much for your help in such a quick turnaround too!
- SamfarUK1 year ago
Helper I
hello again! i am hoping you can help me once 🙂
i used your suggestion for my budget card as shown:
however i now have two different budget types, the original is still "OP25" with the second one being "OP25R", hre's my updated slicer:
how can i add "OP25R" to the measure, i can't figure it out 😞