Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi , I am creating 1 table in which I am showing Sales Revenue. As we have some dpulicates , So I am getting it up distinctly based on Sales_ID. In Qliksesne, I am getting correct sum for Sales_ID. But when it comes to table total , there sum is not coming up correctly . When i tried to check the reason behind this , it comes out that it's because of total is also taking up distinct only which is not expected. Can you please check.
I am getting sum by using ==> Sum(distinct([Sales Revenue]))
Sale_ID | Sales Revenue |
1 | 2450 |
1 | 2350 |
1 | 2350 |
1 | 2350 |
1 | 2350 |
1 | 2350 |
2 | 2350 |
2 | 2350 |
2 | 2350 |
2 | 2350 |
3 | 1000 |
3 | 1000 |
3 | 1000 |
3 | 1000 |
3 | 1000 |
4 | 300 |
4 | 200 |
4 | 500 |
This should work:
sum(aggr(Sum(distinct([Sales Revenue])), Sale_ID))