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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Saranya_Tamil
Frequent Visitor

Need help in DAX

Hi,
I have 2 tables. Table A shows the number of hours eligible to work and Table B shows how many hours they actually worked. I need to calculate Time% i.e.  (hours/Time)*100 for each resource for everyday as output. I have many resources in the table.  Can anyone help to achieve this in DAX. I have highlighted the expected output column.

 

Table A    Table B   
ResourceDateTime  ResourceDatehoursOutput
A01/01/20227.5  A01/01/20227.5100
A02/01/20227.5  A02/01/2022453.33333
A03/01/20227.5  A03/01/20223.546.66667
A04/01/20227.5  A04/01/2022793.33333
A05/01/20227.5  A05/01/20227.5100
A06/01/20227.5  A06/01/20227.5100
B07/01/20227.5  B07/01/2022680
B08/01/20227.5  B08/01/20227.5100
B09/01/20227.5  B09/01/20227.5100
B10/01/20227.5  B10/01/20227.5100
1 ACCEPTED SOLUTION
Arul
Super User
Super User

Hi @Saranya_Tamil ,

You can try the below formula in calculated column,

 

 

Output Column = 
VAR _lookupvalue = LOOKUPVALUE('Table A'[Time],'Table A'[Resource],'Table B'[Resource])
VAR _output = DIVIDE('Table B'[hours],_lookupvalue,0)*100
RETURN _output

 

Arul_1-1669636624759.png

 

Thanks,

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

Hi @Saranya_Tamil ,

You can try the below formula in calculated column,

 

 

Output Column = 
VAR _lookupvalue = LOOKUPVALUE('Table A'[Time],'Table A'[Resource],'Table B'[Resource])
VAR _output = DIVIDE('Table B'[hours],_lookupvalue,0)*100
RETURN _output

 

Arul_1-1669636624759.png

 

Thanks,

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors