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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
some_analyst
Helper I
Helper I

Multiple USERRELATIONSHIP. Possible?

I have a measure which is based on the following data.

 

Table A:

ID, Submitted Date, Completed Date

 

I want to create a measure which counts IDs, which either have Sumbmitted date before the date selected from the slicer (PK_date) and no Completed date, or Completed date after the date selected from the slicer.

 

My relationships are with dim_date on Submitted date and Compelted date, bot inactive. 

 

Can someone help me with this metric? ChatGPT is not helpful

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

USERELATIONSHIP will not help you as it requires equality. You need "before"  and "after"  so you need to keep the relationships inactive and use regular FILTER queries instead.

 

count = COUNTROWS(FILTER('Table A',[Submitted date]<SELECTEDVALUE(Date[PK_date]) && ISBLANK([Completed date]) || [Completed date]>SELECTEDVALUE(Date[PK_date]) )

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

USERELATIONSHIP will not help you as it requires equality. You need "before"  and "after"  so you need to keep the relationships inactive and use regular FILTER queries instead.

 

count = COUNTROWS(FILTER('Table A',[Submitted date]<SELECTEDVALUE(Date[PK_date]) && ISBLANK([Completed date]) || [Completed date]>SELECTEDVALUE(Date[PK_date]) )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.