Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a problem when using this expression for the column Test3 IF (Rank (Total -SUM (tax))<=23, (tax), 0) with this data source.
The expression does not execute the total when I delete the dimension Code.
| Dim1 | Dim2 | Dim Code | tax | Test 3 |
| S | Site1 | 10 | € 8,00 | 8 |
| 20 | € 8,00 | 8 | ||
| 30 | € 8,00 | 8 | ||
| 40 | € 8,00 | 8 | ||
| 120 | € 8,00 | 8 | ||
| 130 | € 8,00 | 8 | ||
| 140 | € 8,00 | 8 | ||
| 170 | € 8,00 | 8 | ||
| 210 | € 8,00 | 8 | ||
| 260 | € 8,00 | 8 | ||
| 50 | € 16,00 | 16 | ||
| 60 | € 16,00 | 16 | ||
| 80 | € 16,00 | 16 | ||
| 150 | € 16,00 | 16 | ||
| 160 | € 16,00 | 16 | ||
| 180 | € 16,00 | 16 | ||
| 200 | € 16,00 | 16 | ||
| 220 | € 16,00 | 16 | ||
| 230 | € 16,00 | 16 | ||
| 240 | € 16,00 | 16 | ||
| 70 | € 24,00 | 24 | ||
| 250 | € 24,00 | 24 | ||
| 270 | € 24,00 | 24 | ||
| 100 | € 52,00 | 0 | ||
| 190 | € 65,00 | 0 | ||
| 90 | € 78,00 | 0 | ||
| 110 | € 270,00 | 0 | ||
| Tot | € 777,00 | 0 |
Exist one solution using the functiion aggr to get the following result?
| S1 | S2 | Test 3 |
| S | Site1 | € 312,00 |
| Tot | € 312,00 |
Thank you
Perhaps: sum(aggr(IF (Rank (Total -SUM (tax))<=23, (tax), 0),Dim1,Dim2,[Dim Code]))
What is the exact expression you are using? Do you have a sample you can share?
Perhaps: sum(aggr(IF (Rank (Total -SUM (tax))<=23, (tax), 0),Dim1,Dim2,[Dim Code]))
Or maybe (assuming a single Dim1 and Dim2 combination possible (which probably is not like in your real setting)):
Sum({<[Dim Code] = {"=Rank(Sum(tax))<=23"}>} tax)