Forum Discussion
navenn08
3 years agoNew Member
DAX ALLSELECTED DISPLAYING BLANKS
Hi All,
I'm trying to create an Average for a count distinct on a time series data, using the below formula i managed to create an Average line
AVG_RECEIPTS =
CALCULATE(
AVERAGEX(Values('DATE'[Date]), CALCULATE( DISTINCTCOUNT(CO_DLY_sample[CLM_NUMBER]))), ALLSELECTED())
but how can i avoid displaying those dates with blank values
I'm expecting the end result to look like this
Thanks,
Naveen
Hi navenn08
Please tryAVG_RECEIPTS = IF ( [TOT_REC] <> BLANK (), CALCULATE ( AVERAGEX ( VALUES ( 'DATE'[Date] ), CALCULATE ( DISTINCTCOUNT ( CO_DLY_sample[CLM_NUMBER] ) ) ), ALLSELECTED () ) )