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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
IF
Post Prodigy
Post Prodigy

Division of 3 different columns

Hi,

 

I would like use the result of the column "R" in my report. Actually it should be: =((PD/C)/((YD*4)/(I+M))).The table is:

 

SubunitYDIMCPD4YDIandMDiv
(4YD/IandM)
Civ
(PD/C)
R
(Civ/Div)
1700006409759071250280000823163.40250.0073.496699
2183862557159218386252400735449824102173.05200.0065.544021
36946693500007000001250277867610500002.65250.0094.469461
4117471142655811747112400469884416012692.93200.0068.155853
533228751273950332287512501329150145968252.89250.0086.461733
67429321109877037429321240029717284184170241.61200.00123.94823
741405931438175414059312501656237455787692.97250.0084.208474
84500005988444500002400180000010488441.72200.00116.53826
Total19120794156532321913203212260076483176347852642.20216.6798.542027

 

Please note that TOTAL is not included in the table. I put here to explain the problem.

In order to do that, I added some columns in power query editor:

- 4YD is YD*4

- IandM is I+M

- Div is 4YD/IandM or =((YD*4)//I+M))

- Civ is PD/C

- R is Civ/Div which is ((PD/C)/((YD*4)/(I+M)))

 

I used the following measure to show the result based on selection:

Measure = CALCULATE(DIVIDE(SUM(Table[Civ]),sum(Table[Div]))

 

I see the result for each subunit is correct. However, when I show the result for total, it doesn't give the correct result. I have more than one unit. It is possible for a user to select more than one unit. Therefore I can not use the row Total. Could you help me how to correct it? In my formula, I get the avarega as Div for total, but it should not do it in that way.

 

All the best

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @IF ,

 

Civ and Div are created by other columns, you could use the following DAX:

Measure 2 =
VAR a =
    DIVIDE ( SUM ( 'Table'[PD] ), SUM ( 'Table'[C] ) )
VAR b =
    DIVIDE ( 4 * SUM ( 'Table'[YD] ), SUM ( 'Table'[I] ) + SUM ( 'Table'[M] ) )
RETURN
    a / b

Here is my test result.

1-1.PNG

 

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

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @IF ,

 

Civ and Div are created by other columns, you could use the following DAX:

Measure 2 =
VAR a =
    DIVIDE ( SUM ( 'Table'[PD] ), SUM ( 'Table'[C] ) )
VAR b =
    DIVIDE ( 4 * SUM ( 'Table'[YD] ), SUM ( 'Table'[I] ) + SUM ( 'Table'[M] ) )
RETURN
    a / b

Here is my test result.

1-1.PNG

 

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

Thank you very much! it works 🙂

vanessafvg
Super User
Super User

what do you want it to show, or do you want to not show a total?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




I want to show the results for each subunit and unit based on the selection. I use card to show the result, which is R column figure. When the use selects subunit it give right calculation. However when the user select unit, which should be total of sub-units, it gives wrong number.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors