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
Priscila_Vindas
New Member

Create a measure removing date filters but using them to filter another date column

Hi!

I'm reporting on leads and actions they do, let's focus on one action: paying a fee.
In a table I have: Created Date of the lead (Connected to a calendar table), lead id, and (if applicable) the date in which the lead paid a fee.

 

On my sheet, I'm filtering based on the Calendar connection (Creation of the lead).


For a specific card, I want this measure: number of people who paid the fee during the days on the slicer. This means: the created date of the lead removed from the filters (skip the slicer), but if the paid fee date is between the dates in the slicer, if should be counted.

I cannot change the slicer value, since I'm going to do the same with several lead actions on the same sheet. So I need to figure out a measure to do this for all the actions.

Thanks a lot for your help!!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Priscila_Vindas , Based on what I got, You can create a join of date table with all dates few join will be inactive, but you can activate using userelationship in measure

 

calculate( SUM(Table[Amount]),USERELATIONSHIP ('Table'[CreateDate], 'Date'[Date]))

 

calculate( SUM(Table[Amount]),USERELATIONSHIP ('Table'[paidDate], 'Date'[Date]))

 

Another way is to have an independent date table, then you can manipulate dates easily

 

//Date1 is independent Date table
new measure = //between
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Created Date] >=_min && 'Table'[Date] <=_max))

 

 

//Date1 is independent Date table
new measure = //equal to max
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] =_max))

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Priscila_Vindas
New Member

Nice! The use relationship worked perfectly for me! Thanks!!!

Anonymous
Not applicable

Hi @Priscila_Vindas 

From my understanding, you have 2 date columns in your table .

1. Created date of the lead

2. The date in which the lead paid a fee


Count of Lead = 
CALCULATE (
    DISTINCTCOUNT ( Sheet1[Lead ID] ),
    ALLEXCEPT ( Sheet1, Sheet1[Date Lead Paid a A fee] )
)

 

Dax_Noob_0-1659665202404.png


Regards

Dax_Noob

amitchandak
Super User
Super User

@Priscila_Vindas , Based on what I got, You can create a join of date table with all dates few join will be inactive, but you can activate using userelationship in measure

 

calculate( SUM(Table[Amount]),USERELATIONSHIP ('Table'[CreateDate], 'Date'[Date]))

 

calculate( SUM(Table[Amount]),USERELATIONSHIP ('Table'[paidDate], 'Date'[Date]))

 

Another way is to have an independent date table, then you can manipulate dates easily

 

//Date1 is independent Date table
new measure = //between
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Created Date] >=_min && 'Table'[Date] <=_max))

 

 

//Date1 is independent Date table
new measure = //equal to max
var _max = maxx(allselected(Date1),Date1[Date])
var _min = minx(allselected(Date1),Date1[Date])
return
calculate( sum(Table[Value]), filter('Table', 'Table'[Date] =_max))

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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