Forum Discussion

adean137's avatar
adean137
Helper I
5 years ago

Help with measure to create desired functionality

Hello,

 

I think my last post got lost in the Spanish Community, so posting this again:

 

I have three tables: Flag connected to Metrics with M:M on Keyword, Volumes connected to Metrics with M:M on Keyword. See tables below: 

 

Flag table:

Keywordflagretailer 1
google mapsRetailerGoogle
amazon primeRetailerAmazon
Cheap ebay dealsRetailerEbay
buy clothes onlinenon-retail 
where to buy onlinenon-retail 
amazon vs googleRetailerAmazon
amazon vs googleRetailerGoogle

 

Metrics table:

KeywordDomainmetric 1metric 2metric 3retailer 2
google mapsGoogle com104070Google
amazon primeGoogle com104070Google
Cheap ebay dealsGoogle com104070Google
buy clothes onlineGoogle com104070Google
where to buy onlineGoogle com104070Google
amazon vs googleGoogle com104070Google
amazon vs googleGoogle com104070Google
google mapsamazon.com306090Amazon
amazon primeamazon.com4070100Amazon
Cheap ebay dealsamazon.com5080120Amazon
Cheap ebay dealsebay.com10010100Ebay
buy clothes onlineebay.com1202032030Ebay
where to buy onlineebay.com1304020Ebay
amazon vs googleebay.com1405030Ebay
amazon vs googleebay.com503010Ebay

 

Volumes table:

keywordvalue
google maps10
amazon prime20
Cheap ebay deals30
buy clothes online40
where to buy online20
amazon vs google60

 

On my page, I have domain filter from the Metrics table and flag filter from Flag table. Domain can only be selected one at a time. For each domain, I would like to also filter this by retailer and non-retailer keywords. However, I only want the retailer flag to be applied for that given domain. For example, if google.com domain is selected and retailer flag is selected, I want to show keywords that have retailer flag AND Google as a retailer. Therefore although the keyword amazon prime has a retailer flag, it would not show up unless the amazon.com domain was selected. When non-retailer flag is selected, I would expect all non-retailer keywords matching the domain in Metrics table to show.

 

Desired output:

 

Any help would be much appreciated.

3 Replies

  • Hi v-lionel-msft ,

     

    Thank you so much for your help with this! I can see that it works. 🙂

     

    What about if I wanted to add a date column to the Volumes table, hence making it a M:M relationship. I tried this and it didn't work. 😞 

     

    Thanks,

    Alicia

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi adean137 ,

     

    '"What about if I wanted to add a date column to the Volumes table, hence making it a M:M relationship. I tried this and it didn't work. "

    Since your model does not contain date data, I did not consider the date when creating the meature. Please complete your model and your expected output.

     

    Best regards,
    Lionel Chen

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