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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Pepperi
Frequent Visitor

Calculate Max value of a running total

Hi,

 

I'm experimenting with PowerBI, which is a fantastic tool and have a great community.

I have a table of deals per customer. We are selling our products as license per user, therefore a customer might add or reduce the number of licenses during its global subscription.

I've created a cumulative total measure and i want now to be able to determine for each customer what was its highest subscription since it's a customer.

For instance, all the deals in the large red rectangle relate to one customer. The highest value is in the small red rectangle.

I'm stuck because the running total is a measure, and the MAX function requires a column.

 

Can you help me on this one?

Thanks in advance

Screenshot_1.png

6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @Pepperi,

 

Please refer to below measures:

Rank =
RANKX (
    ALLEXCEPT ( 'Test Table', 'Test Table'[Custom] ),
    [OPP MRR USD running total],
    ,
    DESC,
    DENSE
)

Max running total =
CALCULATE (
    [OPP MRR USD running total],
    FILTER ( ALLEXCEPT ( 'Test Table', 'Test Table'[Custom] ), [Rank] = 1 )
)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yulgu-msft

 

Hi Yuliana, thank you very much for your reply.

In your example, assuming the deals are sorted by date, I don't understand the cumulative total.
The figures should be:

Screenshot_2.png

 

Anyway, i tried your solution but the results are not as expected:
Screenshot_3.png

Hi @Pepperi,

 

In your scenario, how did you calculate the Running Total values? Also, are records sorted by date in your scenario?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft,

 

Sorry for the late reply.

My issue was solved. Thanks for your help!

Hi @Pepperi how did you end up solving this?

Can you share the DAX for this problem? I'm running into the same issue

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.