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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Two dates needing Filter with no relationship

Hi,

 

Could somebody please help me with the query below?

 

I'm trying to use a count filter on a start and end date referencing another table (BankHols) but I can't create a relationship with one because then there wouldnt be one with the other? I'm sure it would need a relationship unless I'm wrong?

 

CALCULATE(COUNT(RoomUtilisation[New Start Date]), FILTER(BankHols, BankHols[Date] >0)))),"0"
 
CALCULATE(COUNT(RoomUtilisation[New EndDate]), FILTER(BankHols, BankHols[Date] >0)))),"0"
 
Thanks
1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Yes you can create a relationship on one of the common column, and still use other ones to filter in your calculations.

 

Try it, it will work.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User
Pragati11
Super User
Super User

Hi @Anonymous ,

 

I don't understand the bit why you can't create the relationship in your statement below:

I'm trying to use a count filter on a start and end date referencing another table (BankHols) but I can't create a relationship with one because then there wouldnt be one with the other? I'm sure it would need a relationship unless I'm wrong?

 

Can you explain the highlighted statement please?

 

Thanks,

Pragati

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 ,

 

I thought if it was related on the start date e.g. then it wouldnt function through the end date and vice versa?

 

Would it be fine for me to create just one relationship e.g. start date and still use my two count statements below?

 

Thanks

 

Liam

Hi @Anonymous ,

 

Yes you can create a relationship on one of the common column, and still use other ones to filter in your calculations.

 

Try it, it will work.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.