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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
nick9one1
Helper II
Helper II

filtering data from dynamic measure with filter selection

I have a two tables 

 

1. Meeting Dates

2. Submitted values

The submitted values have a month and year columns. The meeting dates are a single date. 

When I select a meeting date in the slicer, I need to filter the submitted values by the same month/year. 

So in the example below I have selected 27/01/2022
The submitted values table should be filtered by 01 in month column, and 2022 in year. 

I assume I need to create two dynamic measures based on the selected meeting date, but not sure how to do this? 

nick9one1_0-1659431337568.png

 



2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @nick9one1 ;

You could create a new table as slicer.

vyalanwumsft_0-1659688091059.png

Then create a flag measure.

flag = IF(EOMONTH(MAX('Table'[Date]),0)=EOMONTH(MAX('slicer'[Date]),0),1)

apply it into filter.

vyalanwumsft_1-1659688152450.png

The final show:

vyalanwumsft_2-1659688165327.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@nick9one1 , Create a date table and join with both the dates. One join will be inactive which you can activate using userelationship

 

This Month =
var _max = eomonth(if(isfiltered('Date'),MAX( 'Date'[Date]) , today()),0)
var _min = eomonth(_max,-1)+1 ,
return
CALCULATE(CALCULATE(Sum(Table[Value]), userelationship(Date[Date], Table[Submit Date] ) ) ,DATESBETWEEN('Date'[Date],_min,_max))

 

 

Or use independent date table and filter both

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Meeting Date] =_max))

 

 

Submit measure =
var _max = maxx(allselected(Date1),Date1[Date])

var _min = eomonth(_max, -1)+1
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Submit  Date] <=_max && 'Table'[Submit  Date] >= _min ))

 

 


To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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