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
pete1234
Frequent Visitor

Filter for previous month on KPI visual

Hello,

 

I have a ticketing system connected to a Power BI database. I have three KPI indicators running down the side. I want to have the target to be exactly the same as the measured value, but for the previous month.

pete1234_0-1726563234763.png

For example, the KPI Slow Responses This Month sums the count of slow response flags within a column, with a "current month" filter on there. I would like the target to be a count of slow response flags, but with a "previous month" filter on there. I do have this filter available, but how do I incorporate the two. 

pete1234_1-1726563420452.png

Will I need a new measure that filters the value with the previous month?


Thanks

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from some_bih , please allow me to provide another insight:

Hi, @pete1234 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_1-1727102475371.png

2. Below are the measure I've created for your needs:

Current month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())))
Last month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())-1))

3.Here's my final result, which I hope meets your requirements.
 

vlinyulumsft_2-1727102539730.png

 Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
some_bih
Super User
Super User

Hi @pete1234 I am not sure that you consider KPI target but filter should work as described on link





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






some_bih
Super User
Super User

Hi @pete1234 try with relative date filter, check link, and see result and then create measure eventually





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Can I incorporate this into the KPI target

 

Anonymous
Not applicable

Thanks for the reply from some_bih , please allow me to provide another insight:

Hi, @pete1234 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_1-1727102475371.png

2. Below are the measure I've created for your needs:

Current month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())))
Last month count = CALCULATE(COUNTROWS('Table'),FILTER(ALL('Table'),MONTH('Table'[Date])=MONTH(TODAY())-1))

3.Here's my final result, which I hope meets your requirements.
 

vlinyulumsft_2-1727102539730.png

 Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.