Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
giorgilomidze
Resolver I
Resolver I

pivot after Summing by categories.

So i have data in which i need to create new column which will be the sum of categories and after that i need to pivot them within Power Bi. I tryed Creating Calculated Column cash Paid Sum = CALCULATE(SUM(Table3[cash paid]),ALLEXCEPT(Table3,Table3[Category])) But after i tried to pivot them it showed me tottaly different numbers. For ex  in shwon model from this formula after pivoting i would get in jan for AA category 6*176=1056 becouse it would summerize 176 for each line.    How can i get results shown on the picture. 

Data model Percentage.PNG

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

Hi @giorgilomidze

 

I got it working by creating the following calculated measure

 

New Measure = DIVIDE(SUM('Table1'[Paid]) , SUM('Table1'[Charged]))

pivot e.png

 

Here is a link to the PBIX file so you can have a play

 

https://1drv.ms/u/s!AtDlC2rep7a-oXqLNxZIwNhHJ9PB

 


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

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

Hi @giorgilomidze

 

I got it working by creating the following calculated measure

 

New Measure = DIVIDE(SUM('Table1'[Paid]) , SUM('Table1'[Charged]))

pivot e.png

 

Here is a link to the PBIX file so you can have a play

 

https://1drv.ms/u/s!AtDlC2rep7a-oXqLNxZIwNhHJ9PB

 


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

Proud to be a Datanaut!

Thank you! works perfectly. 
If anyone interested this will work for Hierarchies as well. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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