Forum Discussion

aashton's avatar
aashton
Helper V
2 years ago

Help setting up data structure/relationships

Hello,

My data consists of different Leads (people), we've met through different sources (at an event, on the web, social media, etc).  I've set up the data structure like:  table Leads includes distinct emails.  This table links to a Lead Sources table 1-to-many on email.  The Lead Sources table includes the Source ID, which links to the Source table (this is events, referral, social media, etc).  The Leads table also links to Applications table on email.  A Lead can have multiple sources.  A lead can have multiple applications. 

I want to display the total number of leads and applications by Source.  But just creating a table visual that includes Lead email, Source, Applicaiton ID, I immediately get an error saying unknown relationship.

 

Have I set up this data structure correctly?  Do you have better ideas?  

 

 

3 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    aashton 

     

    why you need all the bidirectional filters . 

    i would recommend to get rid off the bidrectional filters .

     

    bi directional filters make your DAX hard to interpret and debug. 

     

    other than that, it all depends on your needs .

     

    for you case, 

    get the total number of leads by source : you can get this data from the source and leads source table 

     

    get the total number of applications by source : i assume this is the requirement that because of it, you created the bi directional filters. 

     

    i would recommend to remove all the bi directional filters and activate the bi directional filter just in the calculation of the measure, using crossfilter. 

     

    calculate

    (

    [measure] ,

    crossfilter ( tbl_name[col_1], tbl_name[col_2] , both ) 
    )

     

     

     

     

    If my answer helped sort things out for you, i would appreciate a thumbs up πŸ‘ and mark it as the solution βœ…
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🀠

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi aashton ,

    Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.

    If these also don't help, please share more detailed information and description to help us clarify your scenario to test.

    How to Get Your Question Answered Quickly 

    Regards,

    Xiaoxin Sheng