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
leandroduarte
Helper I
Helper I

Inflation accumulated

Hi, I'm trying to find a solution for accumulated inflation in Dax.

 

This is based on the following rule

 

PeriodInflationAccumulatedRule
15.7%5.7%first row = Inflation
23.1%9.0%2nd row =  (previous month Accumulated + 1 ) * (1+inflation of the row) -1
34.5%13.9%3rd row =  (previous month Accumulated + 1 ) * (1+inflation of the row) -1
45.9%20.6%4rd row =  (previous month Accumulated + 1 ) * (1+inflation of the row) -1
54.3%25.8%5th row =  (previous month Accumulated + 1 ) * (1+inflation of the row) -1
65.9%33.2%6th row =  (previous month Accumulated + 1 ) * (1+inflation of the row) -1
6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

Hello @v-rzhou-msft

Thank you very much for the input. Is there a way that the base period can be chosen by the user and that the function only starts accumulating from that period?

Anonymous
Not applicable

Hi @leandroduarte 

I build a measure to achieve your goal.

Accumulated = 
VAR _FirstAcc =
    SUM ( 'Table'[Inflation] )
VAR _RestAcc =
     (
        PRODUCTX (
            FILTER ( ALL ( 'Table' ), 'Table'[Period] <= MAX ( 'Table'[Period] ) ),
            'Table'[Inflation] + 1
        )
    ) - 1
RETURN
    IF ( MAX ( 'Table'[Period] ) = 1, _FirstAcc, _RestAcc )

Result:

1.png

You can download the pbix file from this link: Inflation accumulated

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Anonymous
Not applicable

Se você puder calcular uma inflação em duas vezes, basta mudar "ALL", para "ALLSELECTED", e criar uma caixa de filtro!!

Gustavo035839_0-1704484415020.png

 

Good morning @RicoZhou , thank you very much for the contribution! I used it on my board and it works perfect!

I have a related query, how should the measure be to visualize the cumulative total of inflation on a card? Continuing with the previous example you would need to display on a card the value 33.2%.

Thank you so much for the help!

Frederick

I share the solution I found to make it look like in the image the inflation accumulated in the last 12 months in card format:

flitvak_0-1625086441511.png

The measure for the card is:

Measure name = (
PRODUCTX(
FILTER(all(FACT_Inflacion); FACT_Inflacion[Date] >= MIN(FACT_Inflacion[Date]));
FACT_Inflacion[IPC - Indec] + 1
)
)-1

amitchandak
Super User
Super User

@leandroduarte , Try a formula

 

calculate(sum(Table[Inflation]), filter(allselected(Table), Table[Period] = max(Table[Period])))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

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.