Forum Discussion
Anonymous
5 years agoNot applicable
Measure Using A Data Log Table
Hello, I have a sales log table described below, and a general calendar table with dates used for analysis. I'm looking to create a measure on the calendar table that will count the SaleStatus for ea...
AnkitKukreja
5 years agoSuper User
Hi
Please try this:
Count =
VAR _MaxDate = CALCULATE( MAX( Calender[Date] ) , ALLSELECTED( Calender) )
VAR _MinDate = CALCULATE( MIN( Calender[Date] ) , All(Calender[Date] ) )
VAR _Count = IF( SELECTEDVALUE( Calender[Date] ) <= _MaxDate ,
CALCULATE( COUNT( 'Sales Log'[ID] ) , FILTER( ALLSELECTED( Calender[Date]),
Calender[Date] <= _MaxDate && Calender[Date] >= _MinDate )), BLANK() )
Return
_Count
Thanks,
Ankit