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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
graceste
Frequent Visitor

last available value

Hi, I'm having problem with a measure and hope you can help me.

I am receiving daily updates for different segments for example:

SegmentValueDate
A101.07.18
B201.07.18
C501.07.18
B705.07.18
C1005.07.18
C1210.07.18
A1001.08.18
B2001.08.18
C1501.08.18
B2505.08.18
C2005.08.18
C3010.08.18

 

I have Date in a Slicer and expected result if I choose 10.08.18 would be following:

SegmentValueLast avail.Value in month 
A 10last value from 1/8/18
B 25last value from 5/8/18
C3030 

 

and if choosen date in Slicer is 10.07.18, the result should be 

SegmentValueLast avail.Value in month 
A 1last value from 1/7/18
B 7last value from 5/7/18
C1212 

 

1 ACCEPTED SOLUTION
v-danhe-msft
Employee
Employee

Hi @graceste,

Based on my test, you could refer to below steps:

Create two measures:

Measure 2 = IF(MAX(Table1[Date])<=SELECTEDVALUE('Table'[Date]),1,0)
Measure1 = IF([Measure 2]=0,BLANK(),IF(CALCULATE(MAX(Table1[Date]),ALLEXCEPT(Table1,Table1[Segment]))= MAX(Table1[Date]),1,0))

Filter the value in Measure1.

1.PNG

Result:

1.PNG2.PNG

You could also download the pbix to have a view.

https://www.dropbox.com/s/w3pnw3nnwjpbo4k/last%20available%20value.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
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-danhe-msft
Employee
Employee

Hi @graceste,

Based on my test, you could refer to below steps:

Create two measures:

Measure 2 = IF(MAX(Table1[Date])<=SELECTEDVALUE('Table'[Date]),1,0)
Measure1 = IF([Measure 2]=0,BLANK(),IF(CALCULATE(MAX(Table1[Date]),ALLEXCEPT(Table1,Table1[Segment]))= MAX(Table1[Date]),1,0))

Filter the value in Measure1.

1.PNG

Result:

1.PNG2.PNG

You could also download the pbix to have a view.

https://www.dropbox.com/s/w3pnw3nnwjpbo4k/last%20available%20value.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-danhe-msft

thanks for your tip, it works

best regards

Grace

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.