Forum Discussion
kodrutz
8 years agoRegular Visitor
Determine average by month average
Hy guys, I am pretty new to DAX and I`m struggling with some of my data. I have the following table: The table contains records from 2013 up to now. I need to determine the aver...
- 8 years ago
Hi Angelia,
Thanks a lot for your help.
It wasn’t exactly the solution to my problem but you kind of pointed me in the right direction.
In the end I figured out how to obtain the results with a combination of measures.
Ashish, thanks for taking the time. :manwink:
v-huizhn-msft
8 years agoMicrosoft Employee
Hi kodrutz,
You use the brand column to calculate the distinct vehicles? If it is, you should create a month column by creating calculated column.
Month=Format(Table[Date],"YYYY-MMM")
Then you can create a measure using the formula below.
Average =
DIVIDE (
CALCULATE ( SUM ( Table[mile age] ), ALLEXCEPT ( Table, Table[month] ) ),
CALCULATE ( DISTINCTCOUNT ( Table[brand] ), ALLEXCEPT ( Table, Table[month] ) )
)
/ CALCULATE ( DISTINCTCOUNT ( Table[month] ), ALL ( Table ) )
If this still can't resolve your issue, please give reponse for further analysis. And you'd better share the sample table in table format rather than screenshot.
Best Regards,
Angelia