Forum Discussion
How to make Contribution to Growth formula
Hi,
I want to calculate a measure where I sum up the growth of all products that have growth vs. last year and in another measure, I want to aggregate the decline of all the products that have a decline.
I've tried with
Growth=If([This Year] > [Last year]; [This Year]-[Last Year])
Decline=If[This Year]<[Last year];[This Year]-[Last Year])
It works on an aggregated level but it sums up the whole year and not per product. I would like to see both how much that is growth and how much that is decline...
Hope you can help
Hi Anonymous,
You can create a calculated column like below to get values in last year same weeknr for the same product:
LastYearSameSKU-WEEKNR = LOOKUPVALUE(data[Value Sales'000],data[PRODUCT],'data'[PRODUCT],data[WEEKNR],'data'[WEEKNR],data[YEAR],'data'[YEAR]-1)
Best Regards,
QiuyunYu
6 Replies
- Greg_Deckler
Community Champion
Add Product to your visual?
- AnonymousNot applicable
Thanks, Greg_Deckler, I wished it was that simple - The visualization I use is a Stacked Column where I have growth, decline and value last year in three different column values and then Value this year in a Line, The 3 columns add up to this year's value.
When I have more than one value in Column values I cannot have anything in Column series...
On the chart above I should have both growths and decline in each period - Now I only have the net growth or decline.
In Excel I can fix it, so it should look something like this:
- v-qiuyu-msft
Community Support
Hi Anonymous,
It's expected that we can't add column to Column Series property if we already add more than one fields into Column Values section.
In your scenario, please share some sample data and show us the desired results, so we can test to see if your requirement can be achieved.
Best Regards,
QiuyunYu