Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a fact table with event attendance that has multiple data points for the same day/week (for different locations and times). I also have a master date dimension table. The two tables are related. In 2020, we had multiple weeks where we did not host events, and therefore have no data for those dates in the fact table. I'm trying to calculate average weekly attendance. When I use the formula
Average = SUM(Fact_Table[YValue]) / DISTINCTCOUNT(Dim_Date_Table[CalendarWeekNumber])
the distinct count returns 53, not the number of weeks that we have data for in the fact table. Is there a way to use the date table in the calculation, but for it to only use data for corresponding dates in the fact table? Thanks!
Solved! Go to Solution.
Hi
Can you try with belwo dax?
Average = SUM(Fact_Table[YValue]) / CALCULATE(DISTINCTCOUNT(Dim_Date_Table[CalendarWeekNumber],FACTTABE[DATECOLUMN]))
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
Hi
Can you try with belwo dax?
Average = SUM(Fact_Table[YValue]) / CALCULATE(DISTINCTCOUNT(Dim_Date_Table[CalendarWeekNumber],FACTTABE[DATECOLUMN]))
Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂
Regards,
N V Durga Prasad
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |