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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Comparing 2 'percent of grand total' columns

Hi,

I am attempting to compare 2 category share columns. Take the following table:

ProductThis yearLast yearThis year category shareLast year's category shareCategory share difference
Hamburgers457041%64%-23%
Hot dogs302027%18%9%
Ice cream352032%18%14%
Total110110100%100% 

I am able to get the fourth and fifth columns by re-entering the 'This year' and 'Last year' columns into a matrix and selecting the 'Show value as -> Percent of grand total' option. However when it comes to comparing the two category share columns to create the sixth column (category share difference) I am stumped. Any assistance would be appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

The solution to my issue is found in another thread. Basically the category share columns have to be created based on the product and year. You can then compare those two measures. If anyone knows how to do this more dynamically (i.e. the same measure would work if the rows were changed from individual food products to another category, such as Food or Drink) that information would still be helpful.

 

Thank you.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

The solution to my issue is found in another thread. Basically the category share columns have to be created based on the product and year. You can then compare those two measures. If anyone knows how to do this more dynamically (i.e. the same measure would work if the rows were changed from individual food products to another category, such as Food or Drink) that information would still be helpful.

 

Thank you.

Anonymous
Not applicable

Hello-

 

   You should be able to do this by creating a DAX measure. 

 

TY = [This year category share]-[last year's category share]

 

Jared

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.