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
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?

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]))

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

Thank you Amit for the response i will try this

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.