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

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
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.