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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
gkakun
Helper III
Helper III

Grouping and calculate % of total

Hi all,

 

I have an issue that I couldnt find answer for. 

I have this table and Im trying to calculate the amount based on the relative duration.

For example, ?for the first row- 18/103*40K=6990

 

gkakun_0-1679909511615.png

 

 

 

Thanks for your help! 

7 REPLIES 7
Arul
Super User
Super User

@gkakun ,

Is Activity Duration a direct column or a measure?
Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Hi,

Its lookup column from different table, using related function. PO# is the key  

@gkakun ,

 try this measure,

Activity calculation = 
VAR _activityDuration = SUM(Table[ Activity Duration])
VAR _allActivityDuration = CALCULATE(
    SUM(Table[ Activity Duration]),ALL(Table))
VAR _result = DIVIDE(_activityDuration ,_allActivityDuration )*40000
RETURN _result 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Thanks a lot for your help.

 

This is like the measure looks like, it should provide 40K eventually, but its ot the case

 

gkakun_0-1679988396700.png

 

and of course, the 40K should be taken from the SC amount, since its changing between the POs 

@gkakun ,

then use SC amount in the measure.

Activity calculation = 
VAR _activityDuration = SUM(Table[ Activity Duration])
VAR _allActivityDuration = CALCULATE(
    SUM(Table[ Activity Duration]),ALL(Table))
VAR _result = DIVIDE(_activityDuration ,_allActivityDuration )*[SC Count]
RETURN _result 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Thanks a lot! unfortunately its not working 😞

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.