Forum Discussion
If statement and count in DAX
- 1 year ago
Hello, villa1980
the most straightforward thing that comes to my mind is this:CALCULATE( DISTINCTCOUNT('Table'[Description]), 'Table'[Status] = "Busy" )
Thank-you for the replies, they have really helped out.
I have another issue related to this.
I have created a calendar table linked by date to the table where these fields above sit. I have 2 metrics, blocked and booked by mins and depots and Description.
There are 8 depots in total for Description 1
Total Blocked for this month = 25470 for Description 1
Total Booked for this month = 35730 for Description 1
Available = Total Mins for whole month - (Blocked and Booked)
My Result should be 282,000
The result i get is = -18,300
I can see that the total mins for the whole month is 42,900 (which comes from my calendar table), however, it should be 343,200. It looks like the total mins for the whole month from the calendar table is not summing up by the depots, it is taking it as a single figure.
Any ideas?
Thanks
Alex