Forum Discussion
Monthly averages issue
NPH2020 , Join to a common date table and there you can have a month, qtr and year.
You can create a measure like
Divide(Sum(Tabel1[Value]), sum(Table2[Work day]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
Hi
Sadly as the mock up of the data didn't account for the fact that the attrubtes repeat in the months and so it is summing the numerator correctly but then dividing but multiple sums of the workdays, rather than one. I have tried the "distinct" function and it does not like that in sum functions, nor does it allow me to sum related columns. It works as a calculated column, but then the aggregation doesn't.
sorry for the original dataset issue....
- amitchandak6 years ago
Super User
NPH2020 , Try
Divide(Sum(Tabel1[Value]), sumX(Summarize(Table2, Table2[EOM],"_1" ,max(Table2[Work day])),[_1]))