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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ninja141
Frequent Visitor

Measure Help

Hello all,

I have been struggling to get my measure below to work correctly, could you provide assistance? This measure is to calculate the cummulative total by PO_Fscl_Perd_Nb and by ID, ignoring the filters on the Doc_Dt column but allow filtering from other columns within a table as well as another table called Project that has one to many relationship to the SAP table on the ID columns, ( the table has these columns ID, Name, SubCategory, Category). The current measure doesnt ignore filters coming from the Doc_Dt column. I have been trying to change the ALLSELECTED to ALL but still didnt work, would really appreciate expert insights.

Cummulative YTD Actual =
VAR currentCloseMonth =
    MAX ( 'Closed Calendar'[Closed Actual Month] )
RETURN
    CALCULATE (
        SUM ( SAP[PO_Std_Amt] ),
        FILTER (
            ALLSELECTED ( SAP ),
            SAP[ID] <= MAX ( SAP[ID] )
                && SAP[PO_Fscl_Perd_Nb] <= MAX ( SAP[PO_Fscl_Perd_Nb] )
        ),
        ALL ( SAP[Doc_Dt] )
    )

 

1 REPLY 1
ThxAlot
Super User
Super User

Not surprising because MAX ( SAP[ID] ) and MAX ( SAP[PO_Fscl_Perd_Nb] ) still evaluate in the current filter context.



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.