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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Get values based based upon inactive relationship

HI Community,

 

I am stuck with rather a simple thing - and have been unable to get my head around this. Have spent hours over various blogs & vieods - who apparently are doing same stuff but wont work for me.

 

I got two tables:

 

Customer_table:
Customer_Id,
Date_Customer_Acquired,
Date_Customer_Purchased

Date:
date()

There is an active relationship b/w customer_table and date table on Customer_Acquired and date().

There is an Inactive relationship b/w customer_table and date table on Customer_Purchased and date().

 

shown below as well.

 

2019-01-22 16 32 29.png

 

I got a slicer on the PBI report with date() from Date_Table.

 

if I put customer_Id on a matrix or a table, it will display all customer_Id which have been acquiared during selected period.

 

Additional to that, All I want is , to display the list of Customer_Ids that have purchased during that same period ie Customer_Ids based upon the Date_Custoemr_Purchase field ie the inactive relationship.

 

Please can someone help.

 

Regards

emudria

4 REPLIES 4
AlB
Super User
Super User

Hi  @Anonymous

 

I am a bit confused by the requirements. Do you want to show the list of customers that have made a purchase in the period in the same matrix as the list of customer that were acquired during the period? The list won't necessarily be the same will they? 

 

Can you explain maybe with an example based on (a sample) of your data what you need, what the result should be? What have you tried so far that doesn't work?

 

If you can share the pbix it will also be most useful.

 

Anonymous
Not applicable

@AlB :

I want to have a date/month slicer. say I choose Jan 2018(from date table -

      which is active connected to customer_table on date_Acquired

   & inactive connected to customer_table on date_purchase)

 

Now, I can put  customer_Id in a table visual, and it will show me all customer_Ids that were acquired in Jan 2018.

 The thing that I am unable to work so far is, In the same table visual, I want to show all customer_Ids which have had any purchases in Jan 2018. I have been able to get the count of these customers by using 

calculate(
    Count(Customer_Table[Customer_Id]),
    UserRelationship(Date[Date], Customer_Table[Date_Customer_Acquired)
)

I am stuck when I want to see the Ids of these customers.

 

In my example, Jan 2018 would not give any customer Id, Feb 2018 would give customer_Id A.

 

Thanks

 

@Anonymous reason you are not getting ids because your active relationship is filtering the data, either you make active to inactive and use relationship to get the count for both acquired and purchase

 

or  change edit interaction for your table visual to not get filter when date is selected and put acquired count measure in table



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Just to make my problem a bit clear, i have attached a sample pbix here with requirements

Link

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.