Forum Discussion
PBI5851
4 years agoHelper V
Rolling counts-ish
hello, with the below data, i am trying to count how many unique items per month/quarter were open (i.e they must fall between orderdate and maxorderdate) PriMKey ItemID OrderDate MaxOrder...
- 4 years ago
Hi,
Please check the below picture and the attached pbix file.
Unique count item: =
CALCULATE (
DISTINCTCOUNT ( Data[ItemID] ),
FILTER (
Data,
MAX ( 'Calendar'[Date] ) >= Data[OrderDate]
&& MIN ( 'Calendar'[Date] ) <= Data[MaxOrderdate]
)
)
Jihwan_Kim
4 years agoSuper User
Hi,
Please check the below picture and the attached pbix file.
Unique count item: =
CALCULATE (
DISTINCTCOUNT ( Data[ItemID] ),
FILTER (
Data,
MAX ( 'Calendar'[Date] ) >= Data[OrderDate]
&& MIN ( 'Calendar'[Date] ) <= Data[MaxOrderdate]
)
)