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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.