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
Anonymous
Not applicable

How can I show the % of sales a shop has within its category instead of the % of total sales

Hello everyone,

 

I have two problems, on one side, im trying to see the % os sales a shop has regarding to is category, but i cant seem to do it nor with visualization options nor Dax (clearly not an expert) and as of right now I can only display the % of sales regarding the total, as seen in the picture below: 

RodrigoGM_0-1653560558218.png

 

On the other hand, when I select an specific shop, it filters another category graph that I have, highlighting the corresponding amount of sales of that shop within the category, but it shows the actual amount of sales, while once again I would like to see the % within the specific category (see picture below):

RodrigoGM_1-1653560716890.png

 

I tried creating the measure : Calculate(sum(sales),all(category)) but it didnt seem to work.

 

thank you on advance!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , assume you have measure sales a new measure

 

calculate([sales], filter(allselected(Table), Table[Category] =max(Table[Category]) ) )

 

 

or

 

calculate([sales], filter(all(Table), Table[Category] =max(Table[Category]) ) )

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , assume you have measure sales a new measure

 

calculate([sales], filter(allselected(Table), Table[Category] =max(Table[Category]) ) )

 

 

or

 

calculate([sales], filter(all(Table), Table[Category] =max(Table[Category]) ) )

Anonymous
Not applicable

Managed to to the trick by then dividing the sales measure by the category measure you gave me nad then creating a tooltip for the graph.

 

Final showing:

 

RodrigoGM_0-1653566745654.png

 

Thank you very much!

Anonymous
Not applicable

It does do the add up by category but I still dont know how to see the % of sales of the shop within their category (excuse the previous reply)

 

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.