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
timazarj
Helper II
Helper II

Multiple Date filter/ relationship

Hi,

My model is simple, a date table for filtering monthly reports, PL Service which is recording the services, Inserted date, Effective Date, & Closing Date, AM Table for service person name and ID. 

There will be two different measures MidTermCancellations based on the inserted date and Cancellation based on the effective date:

Cancellation = CALCULATE( DISTINCTCOUNT('PL Service'[ClientEntity]),
'PL Service'[ActivityCode]="CPOL",
USERELATIONSHIP('PL Service'[EffectiveDate],'Date'[Date]))
MidTermCancellations = CALCULATE(DISTINCTCOUNT('PL Service'[ClientEntity]),
'PL Service'[ActivityCode]="CPOL",
, USERELATIONSHIP('PL Service'[InsertedDate], 'Date'[Date]))
 

timazarj_0-1623778922854.png

But I get blank for the MidTerm Cancellation which should be 146:

timazarj_1-1623779232412.png

The date filter is from the date table.  Please guide me.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@timazarj , can you check InsertedDate has a timestamp. If so join might fail

 

create a date like 

 

Date = [InsertedDate ].date
or
Date = date(year([InsertedDate ]),month([InsertedDate ]),day([InsertedDate ]))

View solution in original post

Anonymous
Not applicable

Hello @timazarj 
You can try few things.
1. Check the column format and make it date.
2. Mark the date table as a date table.
3. Check the min and max of both the Inserted Date and Effective Date and create the date table accordingly using min and max values.

4. Create an active relationship with the inserted date and modify the measure accordingly and check.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@timazarj , can you check InsertedDate has a timestamp. If so join might fail

 

create a date like 

 

Date = [InsertedDate ].date
or
Date = date(year([InsertedDate ]),month([InsertedDate ]),day([InsertedDate ]))

Thank you, it worked.

Anonymous
Not applicable

Hello @timazarj 
Can you please share your pbix file or sample data after removing the sensitive data?

Unfortunately no.

Anonymous
Not applicable

Hello @timazarj 
You can try few things.
1. Check the column format and make it date.
2. Mark the date table as a date table.
3. Check the min and max of both the Inserted Date and Effective Date and create the date table accordingly using min and max values.

4. Create an active relationship with the inserted date and modify the measure accordingly and check.

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