cancel
Showing results 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

Frequent Visitor

## Divide multiple columns by one column

I have a measure that counts the number of funnel deals per stage.

Deal Count = CALCULATE(COUNT('FY, CW, CL Combined'[Stage Count]))

I need to create a calculation that divides Stage-1 through Stage - 5 by stage 6.... in other words

Stage-1/Stage-6

Stage-2/Stage-6

Stage-4/Stage-6

Stage-5/Stage-6

Stage-6/Stage-6

The count measure was very straight forward.  Can't figure out how to make a measure that only includes stages 1-5, and a measure that only includes stage 6, allowing me to divide the former by the ladder.

Above is my count table, by stage.  For example of what I'm looking for, I'd need:

525/7670

393/7670

376/7184

278/7184

.

.

.

5 REPLIES 5
Super User

Hi @fischelr01 ,

You can do this in Power Query.  Here is my solution.Solution
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

Proud to be a Super User!

Frequent Visitor

Thanks!

Super User

Hi @fischelr01 ,

``````let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTJSio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Prospect = _t, Evaluate = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Prospect", Int64.Type}, {"Evaluate", Int64.Type}}),
#"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "Total"}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"Custom", Percentage.Type}}),
#"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Custom", "Pros %"}}),
#"Changed Type2" = Table.TransformColumnTypes(#"Added Custom2",{{"Evaluate %", Percentage.Type}}),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom3",{{"Total %", Percentage.Type}, {"Pros %", type number}}),
#"Changed Type4" = Table.TransformColumnTypes(#"Changed Type3",{{"Pros %", Percentage.Type}})
in
#"Changed Type4"``````

Here is the advanced editor in Power Query. If you go to the Home tab in Power Query, you will see it.  Click on it to open, and then paste the above into it.  If you do this in a new Power BI, you may have to enter a little table to see it active. Here is my table. Create this, then open the Advance Editor, copy and paste right over the code that is there.  You will see the steps on the right side, and you can walk through each step to see what I did.

Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

Proud to be a Super User!

Super User

Hi @fischelr01 ,

Not sure if I understand...would you provide what your expected outcome would look like?

Nathaniel

Proud to be a Super User!

Frequent Visitor

So, trying to mimic this from Excel.

Stages 1-5 are all divided by stage-6.

Thanks!