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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
fosterXO
Frequent Visitor

Variation % calculation based on start

Hi,

I have the following three columns:

DatePrice 1Price 2
01-01-202021
01-02-202031
01-03-202062
01-04-2020121


I would like to have a line graph that displays the % variation from the start date, which I will decide based on a parameter. I want to have something like this:

fosterXO_0-1683656243610.png

At the beginning of the graph all the series are 0% and over time they develop: If I select to start from march price 1 wil do 0% -- 100% and price 2 0% -- -50%.

 

How can I build this measure?

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @fosterXO ,

According to your description, here's my solution.

Create two measures.

Price1 Measure =
VAR _Start =
    MAXX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Date] = MINX ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] )
        ),
        'Table'[Price 1]
    )
RETURN
    DIVIDE ( MAX ( 'Table'[Price 1] ) - _Start, _Start )
Price2 Measure =
VAR _Start =
    MAXX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Date] = MINX ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] )
        ),
        'Table'[Price 2]
    )
RETURN
    DIVIDE ( MAX ( 'Table'[Price 2] ) - _Start, _Start )

Get the correct result:

vyanjiangmsft_0-1683797275087.png

I attach the file below for your reference.

 

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

Best regards,

Community Support Team_yanjiang

 

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @fosterXO ,

According to your description, here's my solution.

Create two measures.

Price1 Measure =
VAR _Start =
    MAXX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Date] = MINX ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] )
        ),
        'Table'[Price 1]
    )
RETURN
    DIVIDE ( MAX ( 'Table'[Price 1] ) - _Start, _Start )
Price2 Measure =
VAR _Start =
    MAXX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Date] = MINX ( ALLSELECTED ( 'Table'[Date] ), 'Table'[Date] )
        ),
        'Table'[Price 2]
    )
RETURN
    DIVIDE ( MAX ( 'Table'[Price 2] ) - _Start, _Start )

Get the correct result:

vyanjiangmsft_0-1683797275087.png

I attach the file below for your reference.

 

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

Best regards,

Community Support Team_yanjiang

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.