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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Previous Month vs. slicers/filters

Hi,

I've been dealing with this problem: I need to add previous month value to my dashboard, so I created measure Previous month value = CALCULATE ( [value], PARALLELPERIOD ( 'Date'[Date], -1, MONTH ) ) , but this doesn't work with slicers (see pic below).  I need to get the new measure into the same card with my other measures. Also banning the filter is not the option, because I need the users to be able to swich between months.

 

Thanks in advance for any help!

Zuzana

 

Example of my data:

YearMonth numberPrevious month  valueActual month valueFiscal y/m
2016-08 $5,289FY2016-08
2016-09$5,289$9,052FY2016-09
2016-10$9,052$8,459FY2017-10
2016-11$8,459$6,715FY2017-11
2016-12$6,715$6,038FY2017-12
2017-01$6,038$7,272FY2017-01
2017-02$7,272 FY2017-02

 

Example of what I'm getting, if I filter out just one month:

Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

What is the data type of YearMonth number?
1.PNG

If it is text type, please firstly add an index column in your current table, then create a calculated column in your table using the formula below.

Previous Month VALUE = IF(
  Table[Actual month value] = 0,
  Table[Actual month value],
  LOOKUPVALUE(
   Table[Actual month value],
   Table[Index],
   Table[Index]-1)
 )

 

This way, when you create table visual and card visual using the newly created column. And you will be able to filter the visuals with slicers.
2.PNG4.PNG


Thanks,
Lydia Zhang

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

What is the data type of YearMonth number?
1.PNG

If it is text type, please firstly add an index column in your current table, then create a calculated column in your table using the formula below.

Previous Month VALUE = IF(
  Table[Actual month value] = 0,
  Table[Actual month value],
  LOOKUPVALUE(
   Table[Actual month value],
   Table[Index],
   Table[Index]-1)
 )

 

This way, when you create table visual and card visual using the newly created column. And you will be able to filter the visuals with slicers.
2.PNG4.PNG


Thanks,
Lydia Zhang

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.