cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

7 REPLIES 7
Super User

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

Arul

Proud to be a Super User!

Helper III

Hi,

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

Super User

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

Proud to be a Super User!

Helper III

Thanks a lot for your help.

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

Helper III

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

Super User

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

Proud to be a Super User!

Helper III

Thanks a lot! unfortunately its not working 😞

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors