Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Percentage within table per row

Hi,

 

Having a bit of a brain-fart here.

 

I have the below table:

Activity Status NameTotal Activity Status
Awaiting Sign-off2
Complete186
In Progress76
Not Started413
On Hold8

 

And I am trying to add a percentage of total column like:

Activity Status NameTotal Activity Statuspercentage of total
Awaiting Sign-off20%
Complete18627%
In Progress7611%
Not Started41360%
On Hold81%



"Total Activity Status" is a measure which is: 

 

Total Activity Status =
DISTINCTCOUNT('Activities'[Activity ID])
 
Thanks for your help.
  • Anonymous 

     

    Hi, to add a "Percentage of Total" column alongside your Total Activity Status measure, you would need to create a new measure that calculates the proportion of each status relative to the total across all statuses.

     

    % of Total Activity Status = 
    DIVIDE(
        [Total Activity Status],
        CALCULATE([Total Activity Status], ALL('Activities'[Activity Status Name]))
    )

     

    Also, to validate the DAX measure output, ideally you would need to provide complete underlying data (i.e., all records from the 'Activities' table or a sufficient sample). This would help other users to give you a fully functional Measure. 

    Hope this helps:) 

2 Replies

  • Anonymous 

     

    Hi, to add a "Percentage of Total" column alongside your Total Activity Status measure, you would need to create a new measure that calculates the proportion of each status relative to the total across all statuses.

     

    % of Total Activity Status = 
    DIVIDE(
        [Total Activity Status],
        CALCULATE([Total Activity Status], ALL('Activities'[Activity Status Name]))
    )

     

    Also, to validate the DAX measure output, ideally you would need to provide complete underlying data (i.e., all records from the 'Activities' table or a sufficient sample). This would help other users to give you a fully functional Measure. 

    Hope this helps:) 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you mate, massively appreciated! 🙂