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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Ignore Existing Relationship

My Lead table contains 2 dates, Open date & Close date.  Currently I have an active relationship between the Close date and a date table for other reports.

 

I'm trying to create a table showing the number of leads that are either open, won or lost & the amount of the won/lost based on the Open date.  When I try to bring in the amount won with Calculate([Amount], [won/lost] = "won"), the results are blank.  I figured out it's due to the existing active relationship between the Close date and a date table.

Is it possible to create a DAX formula to ignore the Close date and a date table relationship?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Ok, got it. If you just want to remove the relationship, you can wrap your calculation with a CALCULATE function and CROSSFILTER function.CROSSFILTER can be used to remove the active relationship by mentioning the filter direction as none, this retains the other existing filters. Based on your exact need, you can explore how this option can be used in your case.

 

something like : CALCULATE( <calculation>, CROSSFILTER(dt1,dt2,none)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

You can use USERELATIONSHIP() function to force the PowerBI to use any relationship. For ex, if you want to use the inactive relationship between the Open date and date from date table, you can use USERELATIONSHIP(open_date,date_from_date_table).

 

Thanks

Raj

Anonymous
Not applicable

Thanks @Anonymous 

 

Currently I don't have an inactive relationship set up.  Is there a way to do it without setting an inactive relationship?  I tried it and it messed up a bunch of other reports.  If that's the only way to do it, I'll try and set up the other reports differently.

Yes. You can use TREATAS function to setup virtual relationship that can be used for filtering. 

Anonymous
Not applicable

Ok, got it. If you just want to remove the relationship, you can wrap your calculation with a CALCULATE function and CROSSFILTER function.CROSSFILTER can be used to remove the active relationship by mentioning the filter direction as none, this retains the other existing filters. Based on your exact need, you can explore how this option can be used in your case.

 

something like : CALCULATE( <calculation>, CROSSFILTER(dt1,dt2,none)

Anonymous
Not applicable

Thanks @Anonymous 

I haven't used CROSSFILTER before, but going to give it a try!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.