Forum Discussion
Compare values by year in PowerBI Desktop
- 9 years ago
Don't know if it is too simplistic, but if you parse the date as 2 added columns (one for year and one for month), then create a line chart with Month as the Axis, Year as the Legend and Quantity as the Value, doesn't that give the effect you are looking for? I didn't add a measure to smooth out the charts, just did the basics and got this:
- 9 years ago
Hi Anonymous,
I have created two measure based on what I understand from you,
- PYR - previous year Qty
- TWOYRBCK = Qty 2 years ago
See the gif,
I hope I made it clear.
Regards,
Siva
Anonymous,
Have you tried calculated columns?
Yes , I have tried columns with YEAR() and MONTH(), but I don't know how to compae values from different years on one chart.
- SivaMani9 years ago
Resident Rockstar
Hi Anonymous,
I have created two measure based on what I understand from you,
- PYR - previous year Qty
- TWOYRBCK = Qty 2 years ago
See the gif,
I hope I made it clear.
Regards,
Siva
- Anonymous9 years agoNot applicable
Hello,
Thanks a lot fort he quick answers. I have tried both methods and both of them worked. I have chosen the first one by shill1000, because it is simpler for manage.
The only difference is that I also have a Date table (the query for the date table is: = Query_Date(#date(2000, 1, 1), #date(2040, 1, 1), null) ), which is related to mine table by column Date and I have used Date[Date] as axis (Date Hierarchy - Month) and Date[Year] as Legend. Q-ty is in Values and it worked fine
Thanks a lot!
- shill10009 years ago
Helper IV
Don't know if it is too simplistic, but if you parse the date as 2 added columns (one for year and one for month), then create a line chart with Month as the Axis, Year as the Legend and Quantity as the Value, doesn't that give the effect you are looking for? I didn't add a measure to smooth out the charts, just did the basics and got this: