Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Division formula for a column

I'm so new at PowerBI and this forum has been of extreme help...
Trying to do a division for a table but not finding the right way how to do it.
I have a Spending Amount for each user..
Query name is "UserSpending"

Username     Spending Amount
User1            500.00
User2           1000.00
User3           555.00
I want to divide each amount by 0.525 but getting an error.

This is what i am using.. which of course is not correct..
Spending-Amount = DIVIDE(0.525,'UserSpending'[Spending Amt])

Can someon help and appreciate it in advance!

  • Hi Anonymous , 

    You could try below methods:

    M code(click Edit Queries, then add column like below)

    Calculated column or measure

    Column = DIVIDE('Table'[Spending Amount],0.525)
    Measure = SUM('Table'[Spending Amount])/0.525

    Best Regards,
    Zoe Zhi

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

1 Reply

  • dax's avatar
    dax
    Community Support

    Hi Anonymous , 

    You could try below methods:

    M code(click Edit Queries, then add column like below)

    Calculated column or measure

    Column = DIVIDE('Table'[Spending Amount],0.525)
    Measure = SUM('Table'[Spending Amount])/0.525

    Best Regards,
    Zoe Zhi

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