Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've dumbed this down a bit, but here is the gist.. User selects a Calendar YearMonth. The second column reads that month's sales and is simply: 'Sum(Sales)'.
The first column shows the sales from 2 months ago. For simplicity, this currently is: 'if([Calendar YearMonth]='2021-02',Sum({<[Calendar YearMonth]={'2020-12'}>} Sales))'.
This works except for Retailer 5. Retailer 5 has $500 of Sales for Dec 2020, and $0 Sales for Feb 2021. QlikSense sort of seems to know this (hence it appearing in the table when Retailers with $0 for Dec 2020 and Feb 2021 don't). However, Dec 2020 is reading '-', when it should say $500. I'm obviously missing something important.
Help appreciated. Thanks.
I'm guessing your issue is with the set analysis / variable / whatever used to generate the 2020-12 value. Do you get a correct result if you hard-code that value instead of using a variable/formula?
Thanks for putting me onto the right path. Instead of if([Calendar YearMonth] = xxx, I needed to have if(v_CalMonth = xxx
Perfect. This was the suspect because the combination of Retailer 5 - 2021-02 presumably doesn't exist in the data, so trying to read Calendar YearMonth in that context would return null rather than the 'expected' 2020-12. Glad you got it working.