How do I get Power BI Area Chart to display Current Year & Previous Year Simultaneously using a slicer?

sunwave

New Member
Joined
Feb 28, 2024
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I have a slicer that is in date format and works perfectly fine with all other visualizations on my power bi page.

I have an area chat visual. I want to show CY and PY revenue on the same area chart visual.

  • The area chart visual shows 2 dots when I remove the x-axis
  • The area chart visual shows 1 dot when I add the x-axis
  • The area chart only shows primary y-axis correctly when disabled from the date slicer but does not show secondary y-axis at all.
  • Here my DAX for CY & PY - They both work ✔️

CY =
SUM(Table[Revenue])

PY =
CALCULATE(
SUM(Table[Revenue]),
SAMEPERIODLASTYEAR(SUM(Table[Revenue]))
)


If this wont work using a slicer, that's fine I can disable my area chart from the slicer. However, I do I get both y-axis (CY & PY) to show simultaneously?
 

Attachments

  • Cy PY Year.png
    Cy PY Year.png
    25.9 KB · Views: 5
  • CY PY Yaxsis.png
    CY PY Yaxsis.png
    26.2 KB · Views: 6
  • Cy PY Year.png
    Cy PY Year.png
    25.9 KB · Views: 5

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top