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
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
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.

Top Solution Authors