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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Orlovaaaa
Regular Visitor

Not able to "connect" filter to panel

Hello everybody! Why is that if I use this visual: Orlovaaaa_2-1722037582026.png , and insert there the "date of sale" of my data, it segments this visual Orlovaaaa_3-1722037732645.png , but if I insert there a DAX formula: "filter= DATESINPERIOD(Sales[Date of sale],(TODAY()-90),-9,MONTH).", it doesnt filter my Orlovaaaa_4-1722037882380.png ?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from @Gaga_Jin  and @Ronak131290 , please allow me to provide another insight: 
Hi  @Orlovaaaa ,

 

According to your formula, do you want the table VISUAL to be dynamically filtered by date based on minimum date (TODAY()-90),-9,MONTH),maximum date (TODAY()-90))

Here are the steps you can follow:

1. Create measure.

Flag =
var _today=TODAY()
var _maxdate=_today - 90
var _mindate=DATE(YEAR(_maxdate),MONTH(_maxdate)-9,DAY(_maxdate))
return
IF(
    MAX('Table'[Date]) >= _mindate&&MAX('Table'[Date])<=_maxdate,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1722241244267.png

3. Result:

vyangliumsft_1-1722241244270.png

If the results above don't meet your expectations, Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Thanks for the reply from @Gaga_Jin  and @Ronak131290 , please allow me to provide another insight: 
Hi  @Orlovaaaa ,

 

According to your formula, do you want the table VISUAL to be dynamically filtered by date based on minimum date (TODAY()-90),-9,MONTH),maximum date (TODAY()-90))

Here are the steps you can follow:

1. Create measure.

Flag =
var _today=TODAY()
var _maxdate=_today - 90
var _mindate=DATE(YEAR(_maxdate),MONTH(_maxdate)-9,DAY(_maxdate))
return
IF(
    MAX('Table'[Date]) >= _mindate&&MAX('Table'[Date])<=_maxdate,1,0)

2. Place [Flag]in Filters, set is=1, apply filter.

vyangliumsft_0-1722241244267.png

3. Result:

vyangliumsft_1-1722241244270.png

If the results above don't meet your expectations, Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Thank you @Anonymous ! Your answer definitely helps and its a very interesting approach. Finally could get the problem solved. 

Gaga_Jin
Frequent Visitor

@Orlovaaaa  , hi 

i think it's not working because you are using this dax formula to create measure. 
just create new table from "modeling" section in power BI, write a dax fromula like this:

Date = ADDCOLUMNS(
    CALENDAR(MIN('Sales'[Order Date]),MAX('Sales'[Order Date])),
    "Year", YEAR([Date]),
    "Month", MONTH([Date]),
    "Month-Year", FORMAT([Date], "MMMM-YYYY"))
 
rewrite calendar function arguments as you wish (as your data requires). 
after creating the Table make sure that it's connected with your sales Data.  relationship must be one-to-many. 
after that, let's create matrix or table. in the slicer field use Date which you created with dax formula. 



 

Thank you!

Ronak131290
Frequent Visitor

Hello Orlovaaaa,

Required More imformation about you issue.

Need more clrification for your issue.

Thank you

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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