Forum Discussion

abukapsoun's avatar
abukapsoun
Post Patron
8 years ago
Solved

Calculated Columns

Hi Dears,

 

I have the following case please: 

 

Column1 Column2

X               Active

Y               Obselete

Z               Active

 

How can I create a new (column or table?) that returns the value of Column1 with a criteria Column2 = Active ? so only X and Z are returned. 

 

Moreover how can I compare two columns and return the differences between both into a new column/ table?

 

Many thanks,

6 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Well, you could use CALCULATETABLE and feed it a filter for Active. Or you could just create a table visualization and use a slicer.

     

    To create a new column with the difference between two other columns, just use subtraction?

    • abukapsoun's avatar
      abukapsoun
      Post Patron

      Greg_Deckler I tried the substraction but it didn't work. In fact, i need to return the difference in rows. 

       

      for example if 

      Column A

      X

      Y

      Z

       

      Column B

      Y

      Z

       

      I want to return a new column with value Z

       

      thanks

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Now I'm really confused as that doesn't seem to be the same problem that was originally stated.

  • Anonymous's avatar
    Anonymous
    Not applicable

    abukapsoun,

    Select “Active” for Column2 in Visual level filters, and right click on your table, select "New Column" and apply the following formula.

    Column = Table1[Column4]-Table1[Column3]



    Regards,
    Lydia