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.
Hii,
Can anyone help me out with this problem.
I have the below table
Timestamp Value
15/06/2020 1:00 10
15/06/2020 1:00 15
15/06/2020 1:00 12
15/06/2020 2:00 11
15/06/2020 2:00 9
The output should be
15/06/2020 1:00 12
15/06/2020 2:00 9
It should show only the last value of each unique dataset. I tried out this measure below, but it took the max value of each timestamp instead of the last one. Could someone pls help me with this?.
@amitchandak @parry2k @az38 @v-lionel-msft
Solved! Go to Solution.
@pbidemouser2 , try
Measure = LASTNONBLANKVALUE(lastvalue[index],MAX(lastvalue[Value]))
or
Measure 2 = sumx(SUMMARIZE(lastvalue,lastvalue[Timestamp],"_1",LASTNONBLANKVALUE(lastvalue[index],MAX(lastvalue[Value]))),[_1])
Hi @pbidemouser2 ,
Is this problem solved?
If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, please let me know.
Best Regards,
Icey
@pbidemouser2 , Try
LASTNONBLANKVALUE(Table[Timestamp],max(table[Value]))
@pbidemouser2 , Only way out is index column as timestamp is the same
https://www.dropbox.com/s/0cdo0e5uf1nv5ss/lastvalue1.pbix?dl=0
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
I couldnt view the pbix file u sent. It says "Object reference not set to an instance of an object".
Also, i'm dealing with live data. So none of the power query methods works. Only creating measures is possible @amitchandak
@pbidemouser2 , we need something else to find the last in the sequence where we have the same time. else we can only find min or max
Measure = LASTNONBLANKVALUE(lastvalue[Index],max(lastvalue[Value]))
Timestamp Index Value
15/06/2020 1:00 1 10
15/06/2020 1:00 2 15
15/06/2020 1:00 3 12
15/06/2020 2:00 1 11
15/06/2020 2:00 2 9
If this is the dataset, then how to get the last value for each timestamp?
Outcome should be
15/06/2020 1:00 12
15/06/2020 2:00 9
@pbidemouser2 , try
Measure = LASTNONBLANKVALUE(lastvalue[index],MAX(lastvalue[Value]))
or
Measure 2 = sumx(SUMMARIZE(lastvalue,lastvalue[Timestamp],"_1",LASTNONBLANKVALUE(lastvalue[index],MAX(lastvalue[Value]))),[_1])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.