Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
myou
Helper II
Helper II

Diffrent Calculation at RowLevel/TotalLevel

Helloo ,

 

I have this table below, where the 3 columns are measures

Name#workingdaysSumHrsMorningDelaySumHrsEarlyLeave
Emp110225
Emp220210
Emp310  
Total402415

 

I want to calculate AVG Morning Delay and Avg Early Leave

 

Name#workingdaysSumHrsMorningDelaySumHrsEarlyLeaveAVGMorningDelayAVGEarlyLeave
Emp110225=22/10=5/10
Emp220215=2/20=15/20
Emp310    
Total402415=24/3Employees15/3employees

 

I wrote this measure, its fine for row level , but the grand level is wrong

 

AVGMorningDelay(Hrs) =
if(ISFILTERED(Employee[exdyn_name]),
DIVIDE([MorningDelay],[#TotalWorkingDays],blank()), -- for row level
DIVIDE([MorningDelay],countrows(Employee),blank()) -- for grand level

)

 

 

 

 

 

 

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @myou ,
 
If the problem persists,could you please share sample data or sample pbix?
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Try Like

 

Avg Delay = DIVIDE([MorningDelay],[#TotalWorkingDays],0)

Over All Avg Delay = averagex (values(Employee[name]),[Avg Delay])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.