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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.