Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ctaishah
Frequent Visitor

How to display current year and prior year in a line chart

Hi,

I am trying to plot a line on this line chart for Prior Year (same month previous year). But it doesn’t work on this chart. I just get 1 dot for the filter i choose. It is suppost to exclude the month filter and give the whole year plot. My Expense & Budget data is aggregated monthly, i do not have daily data.

chart.PNG

 

If I use table, i should get the whole list but i didn't.

table.PNG

 

My formula are chart are

  1. Current Year = CALCULATE([Expenses MTD],REMOVEFILTERS('BIDWH BC_DIM_BFIN_FISCAL_PERIOD'[PERIOD_NAME_SHORT]))
  1. Budget Year = CALCULATE([Budget MTD],REMOVEFILTERS('BIDWH BC_DIM_BFIN_FISCAL_PERIOD'[PERIOD_NAME_SHORT]))
  1. Prior Year = CALCULATE([Expenses MTD], PARALLELPERIOD('BIDWH BC_DIM_DATE'[DATE],-12,MONTH), REMOVEFILTERS('BIDWH BC_DIM_BFIN_FISCAL_PERIOD'[PERIOD_NAME_SHORT]), 'BIDWH BC_DIM_BFIN_FISCAL_PERIOD'[FISCAL_YEAR] = SELECTEDVALUE('BIDWH BC_DIM_BFIN_FISCAL_PERIOD'[FISCAL_YEAR]) - 1)

Other related formula are

  1. Expenses = SUM('BIDWH BFIN_FACT_GL_ACCOUNT'[ACCOUNT_AMOUNT])
  2. Expenses MTD = TOTALMTD([Expenses],'BIDWH BC_DIM_DATE'[DATE])
  3. Budget = SUM('BIDWH BFIN_FACT_GL_ACCOUNT'[BUDGET_AMOUNT])
  4. Budget MTD = TOTALMTD([Budget],'BIDWH BC_DIM_DATE'[DATE])

This is the design of the data model

datamodel.PNG

 

Thank you.

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.