cancel
Showing results for
Did you mean:
Helper V

## Maximum Monthly Revenue per Customer - DAX

I've created a calculated column that calculates the maximum Monthly revenue per customer.

I achieve the desired result, but maybe thaere is a more elegant/effective way to do this?

Highest Month Rev per Customer =
VAR c = Usage[Customer]
VAR m = VALUES(Usage[Month])
RETURN

1 ACCEPTED SOLUTION
Helper V

This also works, but I I am thinking whether it can possibly create circular reference issue...

MAXX(VALUES(Usage[Month]),CALCULATE(SUM(Usage[Revenue]),ALLEXCEPT(Usage,Usage[Customer],Usage[Month])))
3 REPLIES 3
Helper V

This also works, but I I am thinking whether it can possibly create circular reference issue...

MAXX(VALUES(Usage[Month]),CALCULATE(SUM(Usage[Revenue]),ALLEXCEPT(Usage,Usage[Customer],Usage[Month])))
Community Support

Hi, @michaelsh

Have amitchandak’s suggestion helped you to find the solution to this problem?

If his reply has helped you to solve this problem, would you like to mark your own reply as a solution so that others can learn from it too?

According to my test, this kind of measure won’t cause a circular reference issue:

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

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

Super User IV

@michaelsh , approch is fine, if it is working.

Other method for new column

maxx(filter(Usage, [Customer] =earlier([Customer]) && [Month] =earlier([Month])), [Revenue])

Proud to be a Super User!

Announcements

#### Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks