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
campelliann
Post Patron
Post Patron

Inactivating Relationship DAX differs from Physically inactivation

Hi there,
 
In the below measure the result is not quite the expected (very subtle difference), but if I physically inactivate the relationship between Table TicketStatus and Tickets the result is correct. In the measure in bold I also inactivate this relation with crossfilter, so why isnt this working? [UPDATE - Solution 1 does not work, Solution 2 does work, but I do not understand why)

Many thanks 

1) This does not work

Calculate
(Countrows('WI in period'),'WI in period'[Hours_consumed]=0, NOT'WI in period'[LastMonthStatus] IN {7,8},Filter(Tickets,Tickets[CreatedDate(Dateformat)]<max('Calendar 2'[Date])),CROSSFILTER(TicketStatus[Id],Tickets[TicketStatusID],None),CROSSFILTER(TicketType[Id],Tickets[TicketTypeID],None),CROSSFILTER(TicketUrgency[Id],Tickets[TicketUrgencyID],None),USERELATIONSHIP(Tickets[Id],'WI in period'[Id]))

2) This works (wrapping calculate with the crossfilter again)

calculate(Calculate(Countrows('WI in period'),'WI in period'[Hours_consumed]=0, NOT'WI in period'[LastMonthStatus] IN {7,8},Filter(Tickets,Tickets[CreatedDate(Dateformat)]<max('Calendar 2'[Date])),CROSSFILTER(TicketStatus[Id],Tickets[TicketStatusID],None),CROSSFILTER(TicketType[Id],Tickets[TicketTypeID],None),CROSSFILTER(TicketUrgency[Id],Tickets[TicketUrgencyID],None),USERELATIONSHIP(Tickets[Id],'WI in period'[Id])),CROSSFILTER(TicketStatus[Id],Tickets[TicketStatusID],none))



3 REPLIES 3
tamerj1
Super User
Super User

Hi @campelliann 

yes I noticed this behavior. In some cases even with USERELATIONSHIP which failed to automatically deactivate the active relationship and I had to manually CROSSFILTER the active relationship to "None". In some cases had to do that by wrapping the first CALCULATE with another one. Still have no explanation of this behavior. 

Hi there @tamerj1 , but what is the difference between my "solution 1 and solution 2". Why does Crossfilter none in the "middle" of the calculate does not work ( I have used this way many times), but wrapping around in solution 2 does work? Does it have to do with evaluation order or something?


Many thanks

@campelliann 
No they're supposed to be applied at the same time. But this may not be possible technically therefore, need to be applied in two steps using two CALCULATE's

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.