Forum Discussion

hamadani's avatar
hamadani
Frequent Visitor
4 years ago
Solved

Replace (Blank) when Merging Two Tables

Hi,

 

I have two tables as follows:

 

Table 1

Case Id          Case Name
1A
2B
3C
4D
5E
6F
7G


Table 2

Case Id                 Stage
1Stage I
2Stage I
4Stage II
5Stage III

 

I have created a releationship between these two tables based on "Case Id" and trying to visulaise the number of customers in Table 1 based on stages in Table 2. So, what I want and get for my "Table" visualisation is below: 

 

Stage              # Cases
Stage I2
Stage II1
Stage III1
(Blank)3

 

I am now trying to replace the (Blank) in the above visulisation to something else (like "Registered Only"). However, I cannot find a way to do that in Power BI and would be grateful if someone can help me on this please.

 

Thank you

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi,
    I would recommend doing a full outer join and using this in power query to fill the blanks with what you desire.

    Column = IF(ISBLANK([Column]),0,[Column)

     

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    hamadani You will need a disconnected table (no relationships) containing Stage I, Stage II, Stage III and Registered Only as rows. You would then construct a measure to calculate accordingly.

     

    • hamadani's avatar
      hamadani
      Frequent Visitor

      Thanks Greg_Deckler . Do you mean, I need to create a third table with Stage names only? Please note the "Registered Only" is not one of the current stage names in Table 2 and the blanks (which I want to replace its name to Registered Only in my visualisation), only appear after creating a relationship between Table 1 and 2 (which I require that relationship for other purposes too)

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,
    I would recommend doing a full outer join and using this in power query to fill the blanks with what you desire.

    Column = IF(ISBLANK([Column]),0,[Column)