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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
GlynMThomas
Resolver I
Resolver I

Work out percentage of sales per group by date.

Hi Guys,

 

I have some sales data, I need to work out the percentage split per day over different groups so it shows me the percentage split by group for each day. Something like the table below:

 

Sales | Date            | Group | Percent

£300 | 24/01/2019 | Active | 50%

£300 | 24/01/2019 | EFG     | 50%

£200 | 25/01/2019 | Active | 100%

 

As you can see, the first day is split 50/50 between two groups. There would be more groups than this but you get the point.

 

I'm then planning on putting this data in a line graph where the Axis is the Month and year, the legend is the group and the value is the percentage. The plan is to show where what percentages have been invested where over a period of time and allow easy comparison of the groups. At present when I do this it puts the percentages the wrong way. I managed to get this to work in a matrix by selecting percent of column total. I basically want to take that data and stick it in a graph.

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @GlynMThomas 

We would just need a couple measures (you will change the table name to match your model).

First one just to sum the Sales

Sales Amount = SUM ( 'Your Table[Sales] )

Then one that calcualtes the % of total across all groups.

Group % of Total = 
VAR TotalAmount = CALCULATE ( [Sales Amount], ALL ( 'YourTable'[Group] ) )
RETURN 
    DIVIDE( [Sales Amount], TotalAmount )

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @GlynMThomas 

We would just need a couple measures (you will change the table name to match your model).

First one just to sum the Sales

Sales Amount = SUM ( 'Your Table[Sales] )

Then one that calcualtes the % of total across all groups.

Group % of Total = 
VAR TotalAmount = CALCULATE ( [Sales Amount], ALL ( 'YourTable'[Group] ) )
RETURN 
    DIVIDE( [Sales Amount], TotalAmount )

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.