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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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