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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
alamakota97
Frequent Visitor

Slicer with Month year filters visuals accordingly for last and current month

I have a slicer where I select month (from table Dates Calendar) and for example if I choose march 2023 I want to have two gauges filtered adequately, one for last month - february 2023 and the other one for current month - march 2023.

As in the picture shown that date chosen is Dec-2022 and each gauge to be filtered by this slicer accordingly for last and current month, how can I achieve this?  Measure inside Gauge is: Sum(Bad Actors[time])/sum(Bad Actors[all actors]).

alamakota97_0-1687156466597.png
In other visuals I have been using for such filtering measure that I created:

Last Month =
Var _max=Max('Dates Calendar'[Date])
Var _end=EOMONTH(_max,-1)
Var _start=EOMONTH(_max,-2)+1
Var rs=IF(Max('Calendar'[Date])>=_start &&
    Max('Calendar'[Date])<=_end,
    1,
    0
    )
    Return rs
and I was adding this measure to the filter pane : Show items when the value is 1, but for this visual it doesn't work.

My relationship between tables:
alamakota97_1-1687253673081.png

 


 

 

0 REPLIES 0

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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