cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cool_333
Frequent Visitor

DAX help

Hi I need help with dax , output should be as per last 2 columns Compund Inflation & Quaterly Inflation using dax, please help.

MonthQuarterInflationCompounded InflationQuarterly Inflation
01/01/2016Q4 2015-0.00599.50%0.00%
01/02/2016Q4 20150.00299.70% 
01/03/2016Q4 20150.003100.00% 
01/04/2016Q1 20160.002100.20%0.60%
01/05/2016Q1 20160.002100.40% 
01/06/2016Q1 20160.002100.60% 
01/07/2016Q2 2016-0.001100.50%0.50%
01/08/2016Q2 20160.003100.80% 
01/09/2016Q2 20160.003101.10% 
01/10/2016Q3 20160.001101.20%0.70%
01/11/2016Q3 20160.002101.41% 
01/12/2016Q3 20160.0039101.80% 
1 ACCEPTED SOLUTION
ppm1
Solution Sage
Solution Sage

Please try these measure expressions. Format them as a percentage. Replace T2 with your actual table name.

 

Compound =
VAR maxdate =
    MAX ( T2[Month] )
RETURN
    1
        + CALCULATE ( SUM ( T2[Inflation] ), ALL ( T2 ), T2[Month] <= maxdate )

Compound Quarter =
VAR maxdate =
    MAX ( T2[Month] )
RETURN
    1
        + CALCULATE (
            SUM ( T2[Inflation] ),
            ALL ( T2 ),
            VALUES ( T2[Quarter] ),
            T2[Month] <= maxdate
        )

 

ppm1_0-1674921882704.png

Pat

Microsoft Employee

View solution in original post

3 REPLIES 3
ppm1
Solution Sage
Solution Sage

Please try these measure expressions. Format them as a percentage. Replace T2 with your actual table name.

 

Compound =
VAR maxdate =
    MAX ( T2[Month] )
RETURN
    1
        + CALCULATE ( SUM ( T2[Inflation] ), ALL ( T2 ), T2[Month] <= maxdate )

Compound Quarter =
VAR maxdate =
    MAX ( T2[Month] )
RETURN
    1
        + CALCULATE (
            SUM ( T2[Inflation] ),
            ALL ( T2 ),
            VALUES ( T2[Quarter] ),
            T2[Month] <= maxdate
        )

 

ppm1_0-1674921882704.png

Pat

Microsoft Employee
amitchandak
Super User
Super User

@cool_333 ,

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Ok so I need dax formulas to acheive  Compounded infation and quaterly inflation , right now it is calculated in excel. So what is the dax formula to acheive 99.50%, 99.70%, 100.00%,100.20% and Quaterly inflation percentage 0.00%, 0.60% and so on? The data we get is the dates, quaters and inflation and we shpould be able to calculate compound inflation and quaterly inflation using dax.

 

MonthQuarterInflationCompounded InflationQuarterly Inflation
01/01/2016Q4 2015-0.00599.50%0.00%
01/02/2016Q4 20150.00299.70% 
01/03/2016Q4 20150.003100.00% 
01/04/2016Q1 20160.002100.20%0.60%

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors