Forum Discussion
Anonymous
3 years agoNot applicable
Need help with YOY line chart
Hello Community! I'm very new to the Power BI and I need your help creating a year over yer comparision line chart. At the moment I have created a line chart however for the PY it shows full yea...
- 3 years ago
Anonymous
you can create a scope column, then only do the calculation when scope is y
pls see the attachment below
Anonymous
2 years agoNot applicable
ryan_mayu Hello I have one more question. Similar to here where you helped me get yoy data for same date time. How would the forumla change if I'm bringing one more year(2021) I'm looking to compare same timeframe for current year, Previous year and PPY.
'
scope =
VAR _year=year('Table'[Week End])
VAR _py=EDATE(TODAY(),-12)
RETURN IF(_year=YEAR(TODAY()) || _year=year(today())-1 && 'Table'[Week End]<=_py,"y")'
I'm struggling to add the forumla for the PPY
I'm struggling to add the forumla for the PPY
ryan_mayu
Super User
2 years agoAnonymous
maybe you can try this
scope =
VAR _year=year('Table'[Week End])
VAR _py=EDATE(TODAY(),-12)
VAR _ppy=EDATE(TODAY(),-24)
RETURN IF(_year=YEAR(TODAY()) || _year=year(today())-1 && 'Table'[Week End]<=_py||_year=year(today())-2&&'Table'[Week End]<=_ppy,"y")