Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Distinct count of ID based on Latest Status

Hello everyone,

 

I am new to Power BI and need some help. 

 

I have Order ID, Order status and Time modified(Time when the Order status was changed) as columns.

My data looks like this:

Order IDOrder StatusTime modified
111010/02/2023 15:00:00
111710/02/2023 15:05:00
112010/02/2023 16:00:00
112410/02/2023 16:05:00
112010/02/2023 17:05:00
222010/02/2023 12:00:00
222710/02/2023 12:10:00
333010/02/2023 11:00:00
333410/02/2023 12:00:00
333710/02/2023 12:02:00
333010/02/2023 12:30:00
444010/02/2023 13:30:00
444410/02/2023 14:30:00

 

I need the distinct count of Order ID for each day based on the latest Order Status(Order Status changes with time and only the latest Order Status should be considered). 

I need a measure Order Count such that the result looks like this:

DateOrder StatusOrder Count
10/02/202302 //Order ID=112 and 333
10/02/202372 //Order ID=111 and 222
10/02/202341 //Order ID=444

 

Any help would be appreciated.

 

Thank you,

Akshay

3 Replies