Forum Discussion

ksnnidhi's avatar
ksnnidhi
Regular Visitor
4 years ago
Solved

Calculation like excel

Is this calculation is possible in power bi

2 2

3 5

 

5 10

10 20

 

  • ksnnidhi everything is possible in Power BI (except some things) but all things are possible... just not everything.

     

    Create a calculated column like below:

     

    Calculated Column = 

    SWITCH (
    TRUE () ,
    'Table'[Column] = 2 , 2 ,
    'Table'[Column] = 3 , 5 ,
    'Table'[Column] = 5 , 10 ,
    'Table'[Column] = 10 , 20 ,
    BLANK() 
    )

     

    Enjoy 🙂

3 Replies

  • TheoC's avatar
    TheoC
    Community Champion

    ksnnidhi everything is possible in Power BI (except some things) but all things are possible... just not everything.

     

    Create a calculated column like below:

     

    Calculated Column = 

    SWITCH (
    TRUE () ,
    'Table'[Column] = 2 , 2 ,
    'Table'[Column] = 3 , 5 ,
    'Table'[Column] = 5 , 10 ,
    'Table'[Column] = 10 , 20 ,
    BLANK() 
    )

     

    Enjoy 🙂

    • TheoC's avatar
      TheoC
      Community Champion

      ksnnidhi can you kindly look at my response to your solution and accept it as solution to ensure others can find it if they too run into a similar issue?