Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Active and Inactive relationships to run simultaneously in PowerBI

Hello.

I have a dataset that holds data regarding Leads and Opportunities. Opportunity data linked to its originating Lead is displayed as one row in the dataset. There is a lead creation date and an opportunity creation date.
This data set has been created in SQL joining the LeadID from the Lead table, to the Originating LeadID in the Opportunities table.

I have been asked to show all opportunities where the created date on the opportunity happened in the same period as the created date of the lead. The date is being filtered by a calendar table.

An example would be that I have selected July 21, August 21 and September 21 in the filter. I would like a count of the number of rows where the created date for the lead and the created date for the opportunity fell within these months.

I have tried using USERELATIONSHIP but that isn't using my relationships simultaneously, it just makes the active relationship, inactive and makes the inactive relationship, active.

Below is the Relationships I have created.

I'm thinking that what I am trying to achieve is not possible but was wondering if there is a better way of modeling the data to achieve the same outcome.

 

Thank you for your time. Any help is greatly appreciated.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for this. I have had a look at the detail in your link and I think that will help me. I'll have a run through it with my data and let you know if it solved my problem. Thanks for your response.

  • Hi, Anonymous 

     

    May I ask if your problem has been solved? Is the above post helpful to you?

    If  it does, could you please mark the post which help as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.

     

    And it would be better if you could post the solution here which will benefit other users who might have the same issue.

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly