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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
KoenStam
Regular Visitor

Flexible indexed values

(A) I have a relatively simple table with 2 column, one for the date and one containing daily market prices (of aluminium).

(B) I made a graph showing the daily prices over the time period covered by my data.

(C) Subsequently, I made a slicer for the date, making it possible to showing a more narrow time period. Besides, I made 2 measures, one showing the first date of the selected time period and one for the last date of my selected time period:

 

Firstdate = FIRSTDATE('Primary Aluminium'[Date])

Lastdate = LASTDATE('Primary Aluminium'[Date])

 

(D) I made 2 measures showing the related first and last price of the selected time period, using a visual level filter for the date.

 

Question> Now, what I want is to show on the graph is not the actual price per day, but the indexed price. Meaning that the starting price is 1 and the prices of the following days are shown relative to the price of the first day (e.g. instead of 2000 and 2200, it will show 1 and 1.1 for the first two days). The difficulty is that when I change the selected time period, the starting date (and therefore starting value changes), therefore the prices of the following days have to be divided by a different starting value. How to do this?

 

image.png

 

image.png

 

 

 

 

 

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

@KoenStam,

 

You may add a measure as shown below.

Measure =
DIVIDE (
    SUM ( 'Primary Aluminium'[Close] ),
    CALCULATE (
        SUM ( 'Primary Aluminium'[Close] ),
        FIRSTDATE ( ALLSELECTED ( 'Primary Aluminium'[Date] ) )
    )
)
Community Support Team _ Sam Zha
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

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@KoenStam,

 

You may add a measure as shown below.

Measure =
DIVIDE (
    SUM ( 'Primary Aluminium'[Close] ),
    CALCULATE (
        SUM ( 'Primary Aluminium'[Close] ),
        FIRSTDATE ( ALLSELECTED ( 'Primary Aluminium'[Date] ) )
    )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Many thanks, your reply solved my question!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.