Forum Discussion
SimonAbs
8 years agoFrequent Visitor
Calculate(Count (....), (Datesbetween(....)) returns nothing
Hey guys :) I insert the following Measure in Power BI Desktop: Latest_NPS = CALCULATE(COUNTA(NPS[nps_category]);DATESBETWEEN(NPS[ts];[LastestDate_NPS_Start];[LatestDate_NPS_End])) It ret...
- Anonymous8 years ago
Hi SimonAbs,
You can try to use below formula to calculate records between specific date range:
Latest_NPS = VAR currStart = MAX ( NPS[LastestDate_NPS_Start] ) VAR currEnd = MAX ( NPS[LatestDate_NPS_End] ) RETURN CALCULATE ( COUNTA ( NPS[nps_category] ); FILTER ( ALLSELECTED ( NPS ); NPS[ts] IN CALENDAR ( currStart; currEnd ) ) )Regards,
Xiaoxin Sheng
Anonymous
8 years agoNot applicable
Hi SimonAbs,
You can try to use below formula to calculate records between specific date range:
Latest_NPS =
VAR currStart =
MAX ( NPS[LastestDate_NPS_Start] )
VAR currEnd =
MAX ( NPS[LatestDate_NPS_End] )
RETURN
CALCULATE (
COUNTA ( NPS[nps_category] );
FILTER ( ALLSELECTED ( NPS ); NPS[ts] IN CALENDAR ( currStart; currEnd ) )
)
Regards,
Xiaoxin Sheng
SimonAbs
8 years agoFrequent Visitor
Hi Anonymous,
Thanks for the fast reply.
It works perfect :)
Best regards,
Simon