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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Nikhillearn
Frequent Visitor

Power BI Line Chart - Add lines with different growth rates

Hello Experts, 

 

I am working on creating a line chart, it looks fine but i would also like to see what it would look like, if the growth rate is changed

Can this be achieved with Measures if we know the growth rates  ( example 10%, 15%, 5%)

 
 

question.png

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Nikhillearn ,

 

Please check:

10% Rate = 
VAR MinDate =
    MINX ( ALLSELECTED ( 'Table' ), 'Table'[Date] )
VAR MinDateActual =
    CALCULATE ( SUM ( 'Table'[Actual] ), 'Table'[Date] = MinDate )
VAR Rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        MAX ( 'Table'[Date] ) = MinDate,
        MinDateActual,
        POWER ( 1.1, Rank_ ) * MinDateActual
    )
15% Rate = 
VAR MinDate =
    MINX ( ALLSELECTED ( 'Table' ), 'Table'[Date] )
VAR MinDateActual =
    CALCULATE ( SUM ( 'Table'[Actual] ), 'Table'[Date] = MinDate )
VAR Rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        MAX ( 'Table'[Date] ) = MinDate,
        MinDateActual,
        POWER ( 1.15, Rank_ ) * MinDateActual
    )

rate.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

View solution in original post

7 REPLIES 7
Icey
Community Support
Community Support

Hi @Nikhillearn ,

 

Is this problem solved?

 

 

Best Regards,

Icey

Icey
Community Support
Community Support

Hi @Nikhillearn ,

 

Please check:

10% Rate = 
VAR MinDate =
    MINX ( ALLSELECTED ( 'Table' ), 'Table'[Date] )
VAR MinDateActual =
    CALCULATE ( SUM ( 'Table'[Actual] ), 'Table'[Date] = MinDate )
VAR Rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        MAX ( 'Table'[Date] ) = MinDate,
        MinDateActual,
        POWER ( 1.1, Rank_ ) * MinDateActual
    )
15% Rate = 
VAR MinDate =
    MINX ( ALLSELECTED ( 'Table' ), 'Table'[Date] )
VAR MinDateActual =
    CALCULATE ( SUM ( 'Table'[Actual] ), 'Table'[Date] = MinDate )
VAR Rank_ =
    RANKX (
        ALLSELECTED ( 'Table' ),
        CALCULATE ( MAX ( 'Table'[Date] ) ),
        ,
        ASC,
        DENSE
    )
RETURN
    IF (
        MAX ( 'Table'[Date] ) = MinDate,
        MinDateActual,
        POWER ( 1.15, Rank_ ) * MinDateActual
    )

rate.PNG

 

BTW, .pbix file attached.

 

 

Best Regards,

Icey

 

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

amitchandak
Super User
Super User

@Nikhillearn , Are Rate 1, Rate 2 are measures or dimension values, what do mean by growth rate?

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hello Amit, 

 

Rate 1, Rate 2, Rate 3 are not measures yet. I would like to "add" these measures. I want to generate these values automatically probably with a dax formula. For example, Rate 1 is 10%. This means for that Y will be 10% more than previous value. Here are some sample values

XRate 1 ( 10% growth Rate)
11
21.1
31.21
41.331
51.4641
61.61051
71.771561
81.948717
92.143589
102.357948

 

@Nikhillearn , if you have column like X

new column = if([X]=1, 10, POWER(11, [X]))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@Nikhillearn , Can you share sample data and sample output.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you Amit for the response i will try this

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.