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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
learning_dax
Helper II
Helper II

Dynamic Filter Based On Selected Date Slicer

Hi all, 

 

This is a mock screenshot of a monthly report to track # of phone calls we make. We operate on a fiscal year from June 1 to May 31. Referring to the picture below, I am stuck on how to calculate future months phone calls (not including the current month which is the selected date slicer value "August 2022") but limited to the end of our fiscal year. For example, next month I'd like to change the slicer value to "September 2022" & have the "Future Calls Until End of Fiscal Year (Not Including Selected Month)" calculate the number of phone calls made in October-May of this fiscal year, and it would dynamically calculate future phone calls after the current month based on the SELECTED month in the slicer. 

image0.jpeg

 

Also, I have a very extensive date table like year/month/day offset columns, Month Year, Month Year Sort, etc. I got many of these calculated columns off Power BI forums so I added as much as I could so it may help in the future. I hope this helps, any tips on how to navigate this issue? 

 

Thanks in advance & appreciate the help.

 

2 REPLIES 2
amitchandak
Super User
Super User

@learning_dax , Assume you have selected a date

 

new measure =

var _max1 = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())

var _max = if(month(_max1 ) <9, Date(year(_max1 ),8,31) ,Date(year(_max1 )+1,8,31) )

var _min = eomonth(_max1,0)+1

return

//you can use _min and _max in formula

 

@amitchandak Not sure how I would structure the calculation still. Do I use them as filters? The first part of my calculate function would be to calculate # of phone calls so:

CALCULATE(COUNT(Phone_Call_Date))

My selected value as seen in the picture is Month & Year format: August 2022. Does this change anything of the filter context? I'm still not sure how I would build the calculation based on showing future phone calls based on the selected month/year in the slicer.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors