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.
I have the following data i am sending using the api, so I can not create new columns only measures
user_id | State | updated_at |
1 | OFF | 05/30/18 03:27:32 PM |
2 | ON | 05/30/18 03:28:32 PM |
1 | ON | 05/30/18 03:30:32 PM |
2 | OFF | 05/30218 03:34:3PM |
3 | ON | 05/30218 04:34:3PM |
I would like to display a visual "CARD" with the count of all ON's, so I need to take the latest state for the User ID
ON = 2
OFF = 1
Please help
Solved! Go to Solution.
Hi,
The following works for me, can you give it a go and see if it's giving you the correct results:
Measure = CALCULATE(COUNTROWS(FILTER(Table1, Table1[updated_at]=CALCULATE(max(Table1[updated_at]),ALLEXCEPT(Table1,Table1[user_id])))),Table1[State]="ON")
Thanks
Alex
Hi,
The following works for me, can you give it a go and see if it's giving you the correct results:
Measure = CALCULATE(COUNTROWS(FILTER(Table1, Table1[updated_at]=CALCULATE(max(Table1[updated_at]),ALLEXCEPT(Table1,Table1[user_id])))),Table1[State]="ON")
Thanks
Alex
Thank you very much for your reply this is working well, I had tried similar queries but could not get it to work.
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.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |