Forum Discussion
Count by Catagory
- 6 years ago
Anonymous
Yes, you are missing one thing.
It has to be latest value for a given timestamp.
you can refer my sample file.
https://1drv.ms/u/s!AhI1WOiXwAe-qNl6FDPyeZvIv-Xzew?e=98X6Fa
Hi ravitejaballa ,
Try this measure
TestMeasure =
var a = CALCULATE(MAX(deviceHours[timestamp]),ALLSELECTED())
var b = CALCULATE(DISTINCTCOUNTNOBLANK(deviceHours[DeviceID]),FILTER(deviceHours,deviceHours[timestamp] = a))
RETURN
b
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- ravitejaballa6 years ago
Helper III
Anonymous
Thank for reply,
I think we are close to solution.
You solution work for timestamp (7/11/2020) as we have data on this day for all devices.
But as you can see from below for timestamp - 7/13/2020.
It failed, because for binLegend it took max date but we need to get last availabe date in the given range.
Excepted output:
- Anonymous6 years agoNot applicable
Hi ravitejaballa ,
Incase you want the last Available Date, just remove ALLSELECTED()
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
- ravitejaballa6 years ago
Helper III
Anonymous Tried that but failed.