Forum Discussion
Anonymous
6 years agoNot applicable
Average selected date by Count values
HI Team I have 2 filter my report below I have table below format Date Country_Name Count 20-May-20 INDIA 20 20-May-20 AMERICA 10 20-May-20 South africa 30 21-May-20 ...
- 6 years ago
Hi Anonymous ,
You can try measure like this:
average_count = VAR RunningTotal = CALCULATE ( SUM ( 'Table'[Count] ), FILTER ( ALLSELECTED ( 'Table' ), SUMX ( FILTER ( ( 'Table' ), EARLIER ( 'Table'[Country_Name] ) = 'Table'[Country_Name] ), 'Table'[Count] ) ) ) VAR distinct_day = CALCULATE ( DISTINCTCOUNT ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) ) RETURN DIVIDE ( RunningTotal, distinct_day )Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
6 years agoSuper User
Anonymous , Simple Average should have done that, or do you want display against all dates, then you have to use all except : https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/