Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mafioso
Helper II
Helper II

Divide values of one column by 2 and add the result to two other columns

Hi, I am pretty new in Power BI and have tried to fix my problem for several hours but I have no idea how to solve it. 

I have the given table:

 

RevenueDept ADept B
5,00050%50%
35,200,00050%50%
10050%50%

 

As I mentioned above, I want to divide the values of the Revenue column and want to split it 50/50.

Is it somehow possible to do that? 

 

Thanks in advance!

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi @mafioso,

 

Seems you want a new table. Try out this formula as a new table please.

New Table =
SELECTCOLUMNS (
    'Table1',
    "Dept A", [Dept A] * [Revenue],
    "Dept B", [Dept B] * [Revenue],
    "Revenue", 0
)

Divide_values_of_one_column_by_2_and_add_the_result_to_two_other_columns

 

 

Best Regards,

Dale

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

View solution in original post

6 REPLIES 6
v-jiascu-msft
Employee
Employee

Hi @mafioso,

 

Seems you want a new table. Try out this formula as a new table please.

New Table =
SELECTCOLUMNS (
    'Table1',
    "Dept A", [Dept A] * [Revenue],
    "Dept B", [Dept B] * [Revenue],
    "Revenue", 0
)

Divide_values_of_one_column_by_2_and_add_the_result_to_two_other_columns

 

 

Best Regards,

Dale

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

Many thanks Dale!

 

One more question, is it possible to put Dept A and Dept B in the same column? Exactly the same you posted but in 1 col and with the appropriate names.

Hi @mafioso,

 

Can you post the expected result? They could be as follows.

1. The two columns are the same. So only one column will be kept.

Dept             Revenue

2500             0

17600000     0

50                 0

 

2. Unpivot these two columns. This could be complicated.

Dept        Value          Revenue

Dept A     2500           0

Dept A     17600000   0

Dept A     50               0

Dept B     2500           0

Dept B     17600000   0

Dept B     50               0

 

Which one do you expect?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Floriankx
Solution Sage
Solution Sage

Hello, you can create Measures

 

Dept A:=Sum([Revenue]*0,5

 

or you can create a calculated column =[Revenue]*0,5

Ok, but if the Revenue column gets divided, the Revenue column itself must have 0. How can I fix that? So if there are 100 than i put 50 to Dept A and 50 to Dept B and nothing remains in the Revenue col.

Hello,

 

you don't have to display the revenue column.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.