cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamir Member
Member

Crossfilter not working as excpected

Hello,

 

I am trying to calculate new subscribers and leavers.

It seems simple, but it doesn't work.

 

Here are the DAX measures:

 

Count Join =
COUNT ( Subscribers[Registration_ID] )

 

Count Leavers =
CALCULATE (
COUNT ( Subscribers[DateLeft] ),
CROSSFILTER ( 'Calendar'[Date], Subscribers[DateLeft], ONEWAY )
)

 

Here is the PBIX file:

https://basintamir-my.sharepoint.com/:u:/g/personal/tamir_tamirbasin_com/EXjrPKCMhP5LpwEJzQ1VMpsBpgG...

 

Thanks for any help,

Tamir

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
magsod Member
Member

Re: Crossfilter not working as excpected

Hi!

 

Instead of the CROSSFILTER function you should use the USERELATIONSHIP function to activate your inactive relationship.

 

Br,

Magnus

4 REPLIES 4
Community Support Team
Community Support Team

Re: Crossfilter not working as excpected

Hi @Tamir,

 

I was not very clear about your problem. You said "it doesn't work", while what is the desired result? Could you please illustrate the scenario with less data to help me better understand?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Tamir Member
Member

Re: Crossfilter not working as excpected

Hi @v-yulgu-msft

 

There is a list of people who joined at a certain date (Joineddate).

Some left  (Leftdate).

 

In order to use the calendar table, in the data model, I create a link between the dimCalendar[date] to the [JoinedDate].

However, to measure the correct number of leavers I need to link the [LeftDate] instead to the dimCalendar[date].

For that reason, I created an inactive connection in the data model and I am trying to activate it through the Crossfilter function for that purpose only (count leavers by month).

 

Please see the linked file:

MonthlySubscriberCountbysummarizeCorrect

 

It shows the correct number of leaves per month.

It is done with a different method but I am trying to reproduce the result using the crossfilter function.

 

I hope it is clearer now,

 

Thank you for your time

Regards

Tamir

 

 

 

Highlighted
magsod Member
Member

Re: Crossfilter not working as excpected

Hi!

 

Instead of the CROSSFILTER function you should use the USERELATIONSHIP function to activate your inactive relationship.

 

Br,

Magnus

Tamir Member
Member

Re: Crossfilter not working as excpected

@magsod

Thank you.

 

Works like a charm :-)

 

Regards

Tamir