Forum Discussion

HenrikThomsen's avatar
HenrikThomsen
Frequent Visitor
9 years ago
Solved

First and last value from selection using timeline slicer

I am new to Power BI and might not fully have grasped the copnsept of measures, coloumns and selections.

 

My problem is that I have a data set and are trying to create a report showing the beginning-of-period value, flows in period and end-of-period value. I have added the timeline slicer for period selection.

 

Data are like (simplified):

Date  Value  Flow

1        5         7

2        12      -2

3        10      -5

4        5        1

5        6        7

 

I have created a measure called ToDate = CALCULATE(Max(Date),ALLSELECTED(Table))

and a column called UlitmoValue = if(Date=ToDate,Value,0)

 

If I insert the measure ToDate in a card in my report it shows the date chosen from the slider.

If I insert the column UltimoValue in a card it also show the right value - but only when the entire period is chosen from the slider. If I change the end-date using the slider it shows 0.

A card with the sum of Flow works well in connection with the timeline slider.

 

How do I create a field that show the value at the end (and also of the beginning) of my chosen period? Thank you in advance.

3 Replies