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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.