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

Showing % of value within each group on a visualisation

Hi there,

in the picture below you can see that each year in each product group (e.g.: T Shirts) is shows as the percentage OVERALL.

I have used (count of) ean as value, showing the value as percent of grand total

 

 

However, I want it each value to show as the percentage of just the group

 

E.G. On T shirts for 2021 it says 12,35%. That is the percentage compared to the entire data in the graph.

I want to see the percentage of the year based on the product group t shirts.

 

Hope this makes sense 

 

regards

 

nickschw_0-1632228176893.png

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @nickschw ,

Create a measure.

result = 

SELECTEDVALUE('product'[ean])/CALCULATE(SUM('product'[ean]),FILTER(ALL('product'),'product'[product]=SELECTEDVALUE('product'[product])))

1111.PNG

Best Regards

Community Support Team _ polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @nickschw ,

Create a measure.

result = 

SELECTEDVALUE('product'[ean])/CALCULATE(SUM('product'[ean]),FILTER(ALL('product'),'product'[product]=SELECTEDVALUE('product'[product])))

1111.PNG

Best Regards

Community Support Team _ polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @nickschw 

 

If you used a measure to find that %, you need to add ALLEXCEPTED code to your measure -ALLEXCEPTED(table,table[product group])

https://docs.microsoft.com/en-us/dax/allexcept-function-dax

https://www.youtube.com/watch?v=ubrv53XaiFI

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

https://www.youtube.com/watch?v=ubrv53XaiFI

hi,

I have not used a measure for the %. I have "EAN" as value, using count and showing percent of grand total (in the visualization tab). The problem I would see with your soluton, is that I would need a measure for every single product group.

 

Is there an easier solution? One with just one measure?

 

regards

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.