Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Display exclusive values in a table

Hi,

I have 2 tables:
Bucket Master:

Flavor NameBucket
P1Premium
P2Premium
P3Premium
K1KK
K2KK
K3KK
K4KK
K5KK
L1LC
L2LC
L3LC
PF1PFF
PF2PFF
PF3PFF
PF4PFF
U1UC
U2UC



Flavor List:

IDFlavor NameFavor Count
1P12
1L13
2K12
2K51
2PF14
3U15
3PF43
4P11
4P22
4K33

 


I created a summary table using 'Bucket Master':

BucketTotal
Premium3
KK5
LC3
PFF4
UC2

 

This is the current scenario:

 I want to have a 4th column in second table(right-most), which will tell me which flavors are not available in a selected ID:

BucketTotalFlavors PresentMissing Flavors
KK52K2, K3, K4, K5
PFF41PF2,PF3,PF4

 

Please let me know if there is any way to achieve this?

Here is my data model:




 

 

 

 

  • Hi,
    try two these measures:

    Flavors Present =
    DISTINCTCOUNTNOBLANK('Flavor List'[Flavor Name])
     
    Missing Flavors =
    CONCATENATEX (
    FILTER ( 'Flavor Master' , NOT [Flavor Name] IN VALUES ( 'Flavor List'[Flavor Name] ) ),
    [Flavor Name],
    ","
    )

3 Replies

  • Hi,
    try two these measures:

    Flavors Present =
    DISTINCTCOUNTNOBLANK('Flavor List'[Flavor Name])
     
    Missing Flavors =
    CONCATENATEX (
    FILTER ( 'Flavor Master' , NOT [Flavor Name] IN VALUES ( 'Flavor List'[Flavor Name] ) ),
    [Flavor Name],
    ","
    )
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Natallia_23, there's a small problem:

    BucketTotalFlavors PresentMissing Flavors
    KK32K2, PF1,PF2,PF3,PF4
    PFF31PF2,PF3,K1,K2,K3

     

    If total column has same number of flavors, the context which power BI considers takes a hiccup and it'll mix and match for those 2 buckets.

     

    Any help on how to handle this will be appreciated.