Forum Discussion

camarillob's avatar
camarillob
Frequent Visitor
1 year ago
Solved

Categorizing 3 Columns into a Category

Hi all,   Please help me on how I could create a relationship on these two tables.     Some key points for this For Table B, all blank values are null. For Table B, some categories are ...
  • elitesmitpatel's avatar
    1 year ago

    Hey camarillob 
    here is the solution 
    create a calculated column in both the table 

    Unique id =
     var a = IF(LEN(Sheet2[CLASS1])> 1 ,"", Sheet2[CLASS1])
    var b = IF(LEN(Sheet2[CLASS2])> 1 ,"", Sheet2[CLASS2])
     var c = IF(LEN(Sheet2[CLASS3])> 1 ,"", Sheet2[CLASS3])
     RETURN
     CONCATENATE(a,CONCATENATE(b,c))

    Unique id =
     var a = IF(LEN(Sheet1[CLASS1])> 1 ,"", Sheet1[CLASS1])
    var b = IF(LEN(Sheet1[CLASS2])> 1 ,"", Sheet1[CLASS2])
     var c = IF(LEN(Sheet1[CLASS3])> 1 ,"", Sheet1[CLASS3])
     RETURN
     CONCATENATE(a,CONCATENATE(b,c))

    then make the realtionship and the drag the column in table.


    Here is the file 
    Solved PBIX 

    if it helps please Kudos to work and Accept it as Solution