Forum Discussion
Percent change compared to first year
Hi Experts,
Recently, I've started using Power BI Desktop. I am facing a problem and need help. My data contains Year, Income level groups and actual value columns. Now I want to create a line chart to show percent change wrto first year for each income level group. For example, the base year is 2009 so I want to calculate percent change of the remaining years wrto to it.
I have created a below report.
In the above pic, I calculated value for 2009.
Value2009 = CALCULATE(SUM(Income[Actual Value]),FILTER(Income,Income[Year]=2009))
Then diff to find variance.
diff = SUM(Income[Actual Value])-[Value2009]
But as you can see in the snapshot, the "diff" column is not giving me the expected result. For 2009, diff is 0 but for other it just showing the actual values.
Someone please help to fix this.
Would appreciate your helps.
Regards,
Tushar
2 Replies
- v-jiascu-msftMicrosoft Employee
Hi tmore,
You can try it like this.
Value2009 = CALCULATE ( SUM ( Income[Actual Value] ), FILTER ( ALL ( Income ), Income[Year] = 2009 ) )Best Regards,
Dale
- tmoreRegular Visitor
Hi Dale,
Thanks for the reply. This is giving me value for that year. I want to compare each income group in 2009 wrto the same income group in the remaining years. I want to create a line charts, Year vs % change and lines for each income level.
Hope my requirement is clear. Let me know if you have any question.
Thanks,
Tushar