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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Calculate Total across columns to create percentage

I am trying to create a measure that will sum all activities in a table(AL, AM, CA etc) and display in the table the percent of the total activites for the row.  As an example, I would like to have the value for the "AL cell" in the picture below be equal to 39/272.  I have three slicers involved in this situation: one for the county the activity is in, one for the date range for the  activities and one for the company the activity is for.  The values shown in the table below currently respects all slicers involved.   I have not been able to come up with a measure to calculate the total of activites  that will respect the slicers(i.e. come up with the  total 272) so I can use it as a denomintor for each cell.  Any thoughts would be much appreciated.

 

 

Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Turns out the easiest solution is the best!  In the values portion of the control, i selected show the value of the variable as a percentage of the row total.  THis shows the correct percentage  and I didnt have to calculate anything.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Have you solved your problem by the suggestion from @Phil_Seamark?

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you need further help, please share some data sample which could reproduce your scenario and your desired output, so that we can help further investigate on it? 

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Turns out the easiest solution is the best!  In the values portion of the control, i selected show the value of the variable as a percentage of the row total.  THis shows the correct percentage  and I didnt have to calculate anything.

Phil_Seamark
Employee
Employee

Hi @Anonymous

 

You can either create a hardcoded calculation that does lots of summing, OR I'd suggest unpivoting the data so instead of having 1 entity having many columns, convert using the Unpivot other columns feature in Power Query, so that your one entity has fewer columns but many rows,.  You can then make quite dynamic measures to create your calculations.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors