Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 year whereas I only want it to display same yearweek as current.
Another thing I need help with is creating a calculation field 'Change' which calculates the difference beween CY sales vs LY sales YTD (LY should only go upto max this years week. ). My data shows weekly and end of last week. I want the YTD total to display CY, and LY should be end of prior week LY(08/13/2022)
Below is how somewhat my data displays
Id really appreciate any help. Thank you!
Solved! Go to Solution.
@Anonymous
you can create a scope column, then only do the calculation when scope is y
pls see the attachment below
Proud to be a Super User!
you are welcome
Proud to be a Super User!
@ryan_mayu Sorry for the late reply. This is exactly the format I was looking for. I need one additional thing changed and need your help with. My current data is looking YTD and ends last Sat. So for the current report, it should have data from 1/1/23 - 9/2/23. I want the PY to be compare the same time period(Week) so itd be 1/2/22 - 9/3/22 if that makes sense.
@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.
'
@Anonymous
maybe you can try this
Proud to be a Super User!
@ryan_mayu Excellent!! This is exactly what I was looking to do. Thanks a lot for all your help!
you are welcome
Proud to be a Super User!
@ryan_mayu Sorry to bother you again, I have one more question.
Mine doesnt show up in this order. it show up Change, PY, CY, Change% or like below
I tried dragging it or rearranging but its not working. How do I get these in the order like yours?
Also how do I get rid of the decimals and round up?
i have another order table which set up the orders. you can check the attachment i provided.
Proud to be a Super User!
| Site | Year | Week End | YearWeek | Name | Amount | CY vs PY |
| 1 | 2022 | 5/7/2022 | 18 | AAA | 500 | PY |
| 2 | 2023 | 5/6/2023 | 18 | BBB | 100 | CY |
| 3 | 2022 | 5/7/2022 | 18 | CCC | 300 | PY |
| 3 | 2022 | 5/7/2022 | 18 | EEE | 350 | PY |
| 3 | 2022 | 5/7/2022 | 18 | AAA | 100 | PY |
| 2 | 2023 | 5/6/2023 | 18 | BBB | 500 | CY |
| 1 | 2022 | 5/7/2022 | 18 | BBB | 750 | PY |
| 1 | 2023 | 5/6/2023 | 18 | AAA | 600 | CY |
| 2 | 2022 | 5/7/2022 | 18 | AAA | 150 | PY |
| 1 | 2023 | 5/6/2023 | 18 | EEE | 35 | CY |
| 3 | 2022 | 5/7/2022 | 18 | AAA | 95 | PY |
| 1 | 2022 | 5/14/2022 | 19 | EEE | 160 | PY |
| 3 | 2023 | 5/13/2023 | 19 | AAA | 285 | CY |
| 2 | 2022 | 5/14/2022 | 19 | EEE | 125 | PY |
| 2 | 2023 | 5/13/2023 | 19 | EEE | 150 | CY |
| 2 | 2022 | 5/14/2022 | 19 | CCC | 200 | PY |
| 1 | 2023 | 5/13/2023 | 19 | EEE | 450 | CY |
| 1 | 2022 | 5/14/2022 | 19 | CCC | 365 | PY |
| 1 | 2022 | 5/14/2022 | 19 | AAA | 250 | PY |
| 2 | 2023 | 5/13/2023 | 19 | BBB | 950 | CY |
| 2 | 2022 | 5/14/2022 | 19 | BBB | 1000 | PY |
| 3 | 2023 | 5/6/2023 | 18 | CCC | 350 | CY |
| 2 | 2023 | 5/13/2023 | 19 | CCC | 625 | CY |
Heres my sample data. I already have this dashboard on Tableau and I'm trying to recreate it on PowerBI. Below is a snip of what I'm trying to get
At the moment I have the line chart created however I'm unsure on how to create the red boxed section which displays current year total(YTD), PY total(YTD total as same yearweek as CY), Change in $ and change%.
could you pls paste the sample data (not the screenshot) and also provide the expected output?
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |