Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a dataset with the following columns:
Date
Time
units sold
week#
hour
I need to calculate the difference between the hourly sales and their total daily and weekly averages.
Where:
1 - SUM of sales by hours
2 - daily AVERAGES of these SUMS by hours
3 - AVERAGE of ALL hourly sales in a week
4 - result of division of every 1 (SUM of sales by hours) by 3 (total AVERAGE of ALL hourly sales in a week)
I can make the first step by this measure:
I don't understand how to get my "total averages" 3 from this table, to calculate %.
You can find the sample PBIX here.
Solved! Go to Solution.
Here is how you calculate #3
AvgPerWeek =
VAR _DailySoldByHour =
SUMMARIZECOLUMNS(
DimDate[Week+Day+Short],
data[Time (hours)],
allexcept(DimDate,DimDate[WeekNumber]),
REMOVEFILTERS(data[Time (hours)]),
"TotalSold", SUM(data[units sold])
)
RETURN
AVERAGEX(_DailySoldByHour, [TotalSold])
and then you can do the percentage accordingly.
Thanks!!!
Here is how you calculate #3
AvgPerWeek =
VAR _DailySoldByHour =
SUMMARIZECOLUMNS(
DimDate[Week+Day+Short],
data[Time (hours)],
allexcept(DimDate,DimDate[WeekNumber]),
REMOVEFILTERS(data[Time (hours)]),
"TotalSold", SUM(data[units sold])
)
RETURN
AVERAGEX(_DailySoldByHour, [TotalSold])
and then you can do the percentage accordingly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.