Forum Discussion

Tiitti7's avatar
Tiitti7
Frequent Visitor
3 years ago
Solved

Desktop calculation problem

Hello,

 

I have a new column, which is calculated :

Euros per year = Calculation[Hours per year]*50
 
But the question: I need calculation for one row differently: Euros per year = Calculation[Hours per year]*35
 
How I can change it only for the one row?
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Tiitti7 ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data. 

    (2)Click "Transform Data" to enter the Power Query editor and add a index column.

    (3) It's not clear exactly which line you want to make different, so take the third line in the example. We can create a calculated column.

     

    Euros per year = IF('Table'[Index]=3,'Table'[Hours per year]*35,'Table'[Hours per year]*50)

     

    (4) Then the result is as follows.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

  • Hi,

    A calculated column formula like this in the Calculation table will work

    =if(Calculation[country]="X",Calculation[Hours per year]*50,Calculation[Hours per year]*35)

    Hope this helps.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Tiitti7 ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data. 

    (2)Click "Transform Data" to enter the Power Query editor and add a index column.

    (3) It's not clear exactly which line you want to make different, so take the third line in the example. We can create a calculated column.

     

    Euros per year = IF('Table'[Index]=3,'Table'[Hours per year]*35,'Table'[Hours per year]*50)

     

    (4) Then the result is as follows.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

     

    Best Regards,

    Neeko Tang

    If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

  • Hi,

    A calculated column formula like this in the Calculation table will work

    =if(Calculation[country]="X",Calculation[Hours per year]*50,Calculation[Hours per year]*35)

    Hope this helps.