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
at9727
Frequent Visitor

Percentage of each customer

Hello All, 

 

I have a table with multiple customers with multiple categories and their printed meters. I need to get a new column using DAX that shows the percentage for EACH customer of how much they have printed within each category for their OWN total. For example, from the screenshot below, the first two rows should return '8.6%' and '91.3%' respectively.

 

 Screenshot_1.png

 

Basically, I need the percentage of each customer for their own printed meters for each category. Hopefully someone can help. Thank you in advance. 

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

 

Write this measure

 

=CALCULATE(SUM(Data[squaremeter]),ALL(Data[Category$]))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for your reply. 

However, the solution I need is a column with the percentage for each customer.

So, for example, the first 2 rows of the new column should be '8.6%' and '91.3%' respectively. 

Hi,

 

That is what my measure should return?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

The measure stated gives the following column where it shows the percentage across the entire customer base rather than across its own total.  I'm looking for a measure that gives a percentage for each customer for each category for their own total and not all the customers. So, in essence, all the percentages of a single customer should add up to 100%. 

 

Screenshot_1.png

Hi,

 

Does this work?

 

=CALCULATE(SUM(Data[squaremeter]),ALLEXCEPT(Data,Data[sn]))

 

I have assumed that sn is the Customer column.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for the reply. 

Firstly, yes sn = customer 

 

Secondly, the results I get are as shown below in the screenshots. 

Screenshot_2.pngScreenshot_1.png

Hi,

 

My formula has to written as a measure (not a column).  If it still does not help, then share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

When writing the formula as a measure (for both measures) I get the screenshot as seen below. 

 

Screenshot_3.png

Hi,

 

As i have requested in my earlier post, share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.