Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet 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
Hi,
I am attempting to compare 2 category share columns. Take the following table:
Product | This year | Last year | This year category share | Last year's category share | Category share difference |
Hamburgers | 45 | 70 | 41% | 64% | -23% |
Hot dogs | 30 | 20 | 27% | 18% | 9% |
Ice cream | 35 | 20 | 32% | 18% | 14% |
Total | 110 | 110 | 100% | 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.
Solved! Go to Solution.
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.
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.
Hello-
You should be able to do this by creating a DAX measure.
TY = [This year category share]-[last year's category share]
Jared
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
87 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
123 | |
107 | |
61 | |
55 |