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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.