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
Coryanthony
Helper III
Helper III

Help with calculation please

Hello,

I am doing a project on employees, determining overtime meals $ submitted vs overtime meals $ allowed (based on work hours). Then looking to calculate the discrepancy (allowed minus submitted"

 

I have about 10 employees in my data set. 

 

Please help. Thanks

 

Coryanthony_0-1672959404091.png

https://1drv.ms/u/s!ArT_qUJ3u_OibfLftPt85oq6Cu8?e=RUvgxB

 

1 ACCEPTED SOLUTION

Hi @thx ,

I will do one thing, Can please take 
Distinct employee or just summarize the separate table 
for unique employee code .
post that fix over all 8 hrs per day wise count.
 else. you can concatenate the EMP & Date, by the way you can have it unquie count. $25.

Dax. 
Test = 
VAR _V1 = CONCATENATE ( EMP , DATE)
RETURN 
CALCULATE ( SUM ( #hrs), _v1=_v1).

Can you try this way,

Thanks.
Gokul

  

View solution in original post

4 REPLIES 4
Gokul_G16
Resolver I
Resolver I

Hi @Coryanthony ,

can you please brefly your requirement !
Then you will get update.
You wnat calculate sum or avergae. else?.


regards,
Gokul

thx
Frequent Visitor

hi Gokul,

I want to calculate the sum of $ allowed (per employee). The allowed $ is based on hours worked in that given day.

 

Jane smith time sheet:

Date    | Units(hours) | chargecode

1/1/23 | 5hours         |  40001010

1/1/23 | 3hours         |  40274990

1/1/23 | 3hours         |  72849999

 

My current issue is, since the employee worked over 10 hours on 1/1/23, employee would be allowed $25 for that day. But since there are 3 rows related to 1/1/23, the allowed is showing $75 (multiplying x #rows).

 

thank you for your help and assistance. 

i think that's what the user is saying. As I am having similar issue. 

 

Hi @thx ,

I will do one thing, Can please take 
Distinct employee or just summarize the separate table 
for unique employee code .
post that fix over all 8 hrs per day wise count.
 else. you can concatenate the EMP & Date, by the way you can have it unquie count. $25.

Dax. 
Test = 
VAR _V1 = CONCATENATE ( EMP , DATE)
RETURN 
CALCULATE ( SUM ( #hrs), _v1=_v1).

Can you try this way,

Thanks.
Gokul

  

thx
Frequent Visitor

OMG. I am having issues related to this. Hopefully you get a response. I will piggy back off of this :). 

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.