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
Anonymous
Not applicable

Simple formula question

Hi everyone!

 

I want to get cumulative numbers for the previous month and the month by formula.

By the way, the month is selected as the filter and behaves differently.

 

When you have the following data:

 

AttributeValue
P01149
P02192
P03140
P04137
P05129
P06207
P07145
P08150
P09273
P10196
P1145
P120

 

I want to get the maximum period of data with values in the formula, and then I want to get the cumulative value excluding the period.

The maximum period of the data was brought to the formula and unlike hardcoded, it doesn't work at all.

Of course, you can add pre priod fields in the data, but the amount of original data is huge.

I want to solve it by formula.

 

 

max_period = MAXX(FILTER(Sheet2,Sheet2[Value] > 0),Sheet2[Attribute])
pre_preiod = "P"&FORMAT(INT(RIGHT([max_period],2))-1,"00")
pre_accum = SUMX(FILTER(Sheet2,Sheet2[Attribute] <> [max_period]),Sheet2[Value])
pre_accum2 = SUMX(FILTER(Sheet2,Sheet2[Attribute] <> "P11"),Sheet2[Value])
 

dax.jpg

2 REPLIES 2
kentyler
Solution Sage
Solution Sage

Can you be more specific about just what your problems is ? do the big blue arrows represent calculations that don't work ?




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Anonymous
Not applicable

The big blue arrow is a meaningless visual object.
My question is to bring pre_accum dynamically. pre_accum and pre_accum2 should have the same value.

 

Thanks,

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.

Top Solution Authors