Forum Discussion
Cotter2000
9 years agoFrequent Visitor
Revenue by Customer & Year, Filtered Dynamically by additional field
Hi everyone, New to Dax here. I have four fields: Customer, Product Format, Price, Transaction Year For each customer AND transaction Year, I'm trying to calculate a sum of Price for any...
Anonymous
9 years agoNot applicable
Hi Cotter2000
Try the following
1. Create a Band Table with the following columns
RevenueBucket , MinValue, MaxValue
2. Example
| RevenueGroup | Min | Max |
| 0 - 30 | 0 | 30 |
| 31 - 60 | 31 | 60 |
| 61 - 90 | 61 | 90 |
| 91 - 120 | 91 | 120 |
| 121 - 180 | 121 | 180 |
| 181 - 240 | 181 | 240 |
| 241 - 360 | 241 | 360 |
| > 361 | 361 | 999999 |
This in only an example , the Revenue Group , Min and MAx Values will depend on the buckets you need.
3. Next crete a measure of RevenueSum , which I presume you already have.
4. Create a measure called ReturnBandGroup
ReturnBandGroup =
CALCULATE(
VALUES (RevenueBand[RevenueGroup]),
FILTER (
RevenueBand,
[RevenueSum] >= RevenueBand[Min]
&& [RevenueSum] <= RevenueBand[Max]
)
)
5. Now use this ReturnBandGroup measure in your reports.
If this solves your issue please accept it as a solution and also give KUDOS.
Cheers
CheenuSing