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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.