Forum Discussion
Calculate increase every year
Hello Community,
I need to calculate the increase in growth with comparison to the previous year in the graph.
Thanks in advance
Hi, Anonymous
You can try the following methods.
- Create a calculation column to calculate the time of the previous year.
Last year = DATEADD ( 'Table'[Year], -1, YEAR )2. Calculate the growth rate of the current year over the previous year.
Growth Supply = CALCULATE ( SUM ( 'Table'[Supply] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Year] ) ) ) - CALCULATE ( SUM ( 'Table'[Supply] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Last year] ) ) )Growth Demand = CALCULATE ( SUM ( 'Table'[Demand] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Year] ) ) ) - CALCULATE ( SUM ( 'Table'[Demand] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Last year] ) ) )3. Show results in graph.
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- FsciencetechHelper III
Anonymous please share sample data and your desired output.
- FowmySuper User
Anonymous
Make sure you have a calendar table,Growth vs PY = VAR __currentyear = SUM ( tablename[demand] ) VAR __previousyear = CALCULATE ( SUM ( tablename[demand] ), DATEADD ( dates[Date], -1, YEAR ) ) VAR __growth = __currentyear - __previousyear RETURN __growth - PBIfanaticHelper V
Hi Anonymous
Try the zebra bi chart, it gives you the differences in the chart, you just have to add the plan/target field in the visual.
https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa200000805?tab=overview
- v-zhangtiCommunity Support
Hi, Anonymous
You can try the following methods.
- Create a calculation column to calculate the time of the previous year.
Last year = DATEADD ( 'Table'[Year], -1, YEAR )2. Calculate the growth rate of the current year over the previous year.
Growth Supply = CALCULATE ( SUM ( 'Table'[Supply] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Year] ) ) ) - CALCULATE ( SUM ( 'Table'[Supply] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Last year] ) ) )Growth Demand = CALCULATE ( SUM ( 'Table'[Demand] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Year] ) ) ) - CALCULATE ( SUM ( 'Table'[Demand] ), FILTER ( 'Table', 'Table'[Year] = EARLIER ( 'Table'[Last year] ) ) )3. Show results in graph.
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.