Forum Discussion
average based on date slicer
- Anonymous2 years ago
Hi Anonymous ,
I have tested sudhisami_azure 's solution and there is no error, here is the test results:Total = COUNT('Table'[Count])Average = AVERAGEX(VALUES('Table'[Date]), [Total])60 / 28 =2.14285......
Or you can try:Average 2 = VAR _Date = DISTINCTCOUNT('Table'[Date]) RETURN [Total] / _Date
If you still can't implement it, then there is a problem with your data structure and not with DAX, as ryan_mayu said, please provide sample data or a pbix file.
Best Regards,
Dino Tao
If this post helps, then please consider Accept both of the answers as the solution to help the other members find it more quickly.
Hi Anonymous ,
I have tested sudhisami_azure 's solution and there is no error, here is the test results:
Total = COUNT('Table'[Count])Average = AVERAGEX(VALUES('Table'[Date]), [Total])
60 / 28 =2.14285......
Or you can try:
Average 2 =
VAR _Date = DISTINCTCOUNT('Table'[Date])
RETURN
[Total] / _Date
If you still can't implement it, then there is a problem with your data structure and not with DAX, as ryan_mayu said, please provide sample data or a pbix file.
Best Regards,
Dino Tao
If this post helps, then please consider Accept both of the answers as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
thank you for your help
i just checked the file and it does not work( my file contain a query which i get it form my sharepoint website)
but when i created a new report ( improt from excel ) it work excalty like what you attached
so just for my knowledge what you think the issue is from ? unfortuntly i cant attached the file here because it contains some sensitive informatiomn related to my duty