Forum Discussion
Count by Catagory
- 6 years ago
Thanks for reply,
I already have these measure in my report.
Using this measure, i want to get count of number of deviceID for each legend.
Like below.
Hi ravitejaballa ,
Based on your Data No of Distinct Device Id are as below.
In such case you can just use.
How did you get 1 , 2, 1, 1 .
Let me know if I am missing something.
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 agoHelper III
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
- Anonymous6 years agoNot applicable
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 agoHelper 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: