Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a raw data like below.
Master_Column | Slave_Column_1 | Salve_Column_2 | Amount |
Raw Material | Gold | China | 100 |
Raw Material | Silver | Brazil | 50 |
Raw Material | Gold | China | 100 |
Food | Frozen Food | Russia | 50 |
Raw Material | Gold | China | 100 |
Now, I use a table in QS to present it like this. For the Amount_2 measure, any suggested formula I can use?
Master_Column | Slave_Column_1 | Amount | Amount_2 |
Raw Material | Gold | 100 | 200 |
Raw Material | Silver | 100 | 100 |
Raw Material | Gold | 100 | 200 |
Food | Frozen Food | 50 | 50 |
Raw Material | Gold | 100 | 200 |
I tried to write like this but some row in Amount_2 become 0 like below table.
Sum(aggr(sum([Amount]),[Master_Column]))
Master_Column | Slave_Column_1 | Amount | Amount_2 |
Raw Material | Gold | 100 | 200 |
Raw Material | Silver | 100 | 100 |
Raw Material | Gold | 100 | 0 |
Food | Frozen Food | 50 | 50 |
Raw Material | Gold | 100 | 0 |
Using NODISTINCT should resolve the issue. Try like:
Sum(aggr(NODISTINCT sum([Amount]),[Master_Column]))
Using NODISTINCT should resolve the issue. Try like:
Sum(aggr(NODISTINCT sum([Amount]),[Master_Column]))
Thank you. You solve my question.