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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MapleFox36
New Member

Percent of Sales

Hello, I am trying to create a measure to be able to display account as a % of Sales.

My dataset is an account export that is already mapped, and so Sales and Expenses aree all in the same table.

 

So far I have 3 measures.

Total Value = sum([Amount DrCr])

Total Revenue = =CALCULATE([Total Value],ALLSELECTED(),tbl_COA_Reference[Level4]="Revenue") , where Level 4 is part of the account mapping.

% Revenue = DIVIDE([Total Value],[Total Revenue],0)

 

It works fine when I am only showing 1 period, but when I extend with multiple periods in the pivot table columns, the %s displayed change to % of row instead of % of sales (see attached for correct single-period, and incorrect multi-period).

 

I assume the error is on the Total Revenue measure, but any help is appreciated2022-04-06 17_56_00-Overall P&L Analysis - Excel.png2022-04-06 17_56_16-Overall P&L Analysis - Excel.png

 

1 ACCEPTED SOLUTION
Whitewater100
Solution Sage
Solution Sage

Hi:

You can obtain the share percent a few different ways. One thing though, your measure for Total Value would usually look like Total Value = SUM(TableName, [Column Name]) and that is not what is shown above. Seeing your data (Fact Table layout and Dimension for Accounts)could help answer correctly. That mentioned, A couple of ways you can try is:

Share of Value 1 =

DIVIDE([Total Value],

CALCULATE([Total Value], REMOVEFILTERS()))

or Share of Value 2 = 

 DIVIDE(SUMX(YOURTABLENAME, [Total Value]),

SUMX(ALLSELECTED(YOURTABLENAME), [Total Value]))

 

View solution in original post

2 REPLIES 2
v-cazheng-msft
Community Support
Community Support

Hi @MapleFox36 ,

 

May I know whether your issue has been resolved? If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problem, please provide some sample data contained in your tables and let us know their relationships so we can help you find the solution. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Whitewater100
Solution Sage
Solution Sage

Hi:

You can obtain the share percent a few different ways. One thing though, your measure for Total Value would usually look like Total Value = SUM(TableName, [Column Name]) and that is not what is shown above. Seeing your data (Fact Table layout and Dimension for Accounts)could help answer correctly. That mentioned, A couple of ways you can try is:

Share of Value 1 =

DIVIDE([Total Value],

CALCULATE([Total Value], REMOVEFILTERS()))

or Share of Value 2 = 

 DIVIDE(SUMX(YOURTABLENAME, [Total Value]),

SUMX(ALLSELECTED(YOURTABLENAME), [Total Value]))

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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