Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Create a boolean KPI based on categorical variable

Hi,    Posting a subset of my dataset that looks like this:   Product Code Type abc1 Type1 abc1 Type2 abc2 Type1 abc3 Type2 abc5 Type1 abc5 Type2 abc7 Type1 abc...
  • TeigeGao's avatar
    7 years ago

    Hi Anonymous ,

    There is not a visual can display like your example, we can use multiple visual to display it, we cna create three measures to display these data:

    Measure = IF(CALCULATE(MIN(Table1[Type]),FILTER(ALL(Table1),Table1[Product Code] = SELECTEDVALUE(Table1[Product Code]) && Table1[Type] = "Type1")) = BLANK(),"No","Yes")
    Measure 2 = SELECTEDVALUE(Table1[Product Code])
    Measure 3 = IF(CALCULATE(MIN(Table1[Type]),FILTER(ALL(Table1),Table1[Product Code] = SELECTEDVALUE(Table1[Product Code]) && Table1[Type] = "Type2")) = BLANK(),"No","Yes")

    The result will like below:

    Best Regards,

    Teige