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

cumulative index

First post on the forum, so forgive me if I am not following forum rules.  I'm very new to Power BI DAX formulas, and creating a cumulative total measure is prooving very difficult.  I've read several threads on this site and others, but so far I can't seem to make it work the way it should.  Here is the RunningTotal measure formula I've written:

RunningTotal =
CALCULATE (
        SUM ( 'Curve Comparison Files'[2017Q1] ),
        FILTER (
                ALLSELECTED ( 'Curve Comparison Files'[2017Q1] ),
                min('Curve Comparison Files'[Normalized Days]) <= MAX ( 'Curve Comparison Files'[Normalized Days] )
        )

)

This is just returning the same data that was entered in.  I'm guessing it's summing all data within the same day, which is just the one single datapoint.  Any suggestions?

 Table.PNGResults Table.PNGCharts.PNG

1 ACCEPTED SOLUTION

@BEverett

 

Try this one please

 

RunningTotal =
CALCULATE (
    SUM ( 'Curve Comparison Files'[2017Q1] ),
    FILTER (
        ALLSELECTED ( 'Curve Comparison Files' ),
        'Curve Comparison Files'[Normalized Days]
            <= MAX ( 'Curve Comparison Files'[Normalized Days] )
    )
)

Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@BEverett

 

Please Try this one

 

RunningTotal =
CALCULATE (
    SUM ( 'Curve Comparison Files'[2017Q1] ),
    FILTER (
        ALLSELECTED ( 'Curve Comparison Files' ),
        'Curve Comparison Files'[Normalized Days]
    )
        <= MAX ( 'Curve Comparison Files'[Normalized Days] )
)

Regards
Zubair

Please try my custom visuals

It's giving me an error message:

"A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

@BEverett

 

Try this one please

 

RunningTotal =
CALCULATE (
    SUM ( 'Curve Comparison Files'[2017Q1] ),
    FILTER (
        ALLSELECTED ( 'Curve Comparison Files' ),
        'Curve Comparison Files'[Normalized Days]
            <= MAX ( 'Curve Comparison Files'[Normalized Days] )
    )
)

Regards
Zubair

Please try my custom visuals

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.