Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Good morning,
I am trying to compute a monthly average consumption per customer per selling point,
what I would like to have is, for a given selling point, for a given month, how much is the average consumption per customer?
I used:
The problem is that if I make a matrix for a given selling point, and a given month (and year), the average in some cases changes across the customers, but I don't understand why
can anybody help me?
thanks very much
Davide
AvgSales should be simply AVERAGEX( Customers, [Consumption] ), where [Consumption] is the measure [Consumption] := SUM ( 'IT trans cc vegacrm2'[Sale_value] ). The rest is done through suitable slicing.
First of all, thank you daxer for your answer, I then tried
[Consumption] must be a measure. Your formula does not work because SUM(...) is an expression, not a measure. If you want to use an expression, you must wrap it in CALCULATE that does the necessary context transition. Also, the outer CALCULATE is not needed when defining AvgSales. Moreover, you can't use a naked column under AVERAGEX as the first argument. You have to retrieve values of the column through a table expression. For instance, VALUES or DISTINCT.
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
29 | |
17 | |
11 | |
7 | |
5 |