Forum Discussion
Redacted_VAR
2 years agoHelper I
Weird Sum Error
Hi All, very strange one, let me explain using the below example data, i have a table much like the below: Account Revenue Customer 1 £100 Customer 2 £50 Customer 3 £50 Cus...
- 2 years ago
If I understood the purpose of your measure correctly you would have to remove row context to calculate your average Revenue to be able to use it in a table:
e.g.
Colour =VAR TotalRevenue = CALCULATE(SUM('Table'[Revenue]), ALL('Table'))VAR TotalCustomers = CALCULATE(DISTINCTCOUNT('Table'[Account]), ALL('Table'))VAR AvgRevenuePerCustomer = DIVIDE(TotalRevenue, TotalCustomers)VAR CurrentRevenue = SUM('Table'[Revenue])RETURNIF(CurrentRevenue > AvgRevenuePerCustomer,"Green","Red")
Redacted_VAR
2 years agoHelper I
worked it out, if i wrapped the ALL() Table in a Filter() and reapplied then it worked.