Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Percentage Calculation from two Calculated Column

 

 

Hi team,

I'm having two calculated columns  -

 - Completed Journey

- Total Journey

 

I just wanted to write Dax to calculate percentage as below -

PercentShow = 'Journey'[completed journey]/Journey'[completed journey]

 Or

PercentShow = Divide('Journey'[completed journey],Journey'[completed journey],0)

 

But It is NOT calculating properly.

Need your help urgently on this please.

 

Regards,

Samrat

1 Reply

  • Hello sam_ach,

     

    you must not use calculated columns to calculate percenteges because they add up in the end resulting in such high numbers.

     

    You need to use a measure.

    Divide(SUM('Journey'[completed journey]),SUMX(ALL(Journey),Journey'[completed journey]),0)

    Maybe you don't need the ALL but I don't know what you actually are trying to achieve.

    Here is a good article about the diffrence regarding calc columns & measures

     

    If this post was helpful may I ask you to mark it as solution and give it some kudos?

    Have a nice day!

    BR,
    Josef