Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am fairly new to Qlikview, and have a bit of an issue with my BarChart. I have a calculated expression that I am using to find the number of days a gate date has been pushed out. I only want to show the amount of days, but disabling the other expressions used in the calculation results in nothing showing. I did find that I can make the expressions invisible, but as you can see, the headers are then offset and look wrong.
Any suggestions on how I can show ONLY the calculated number of days?
Attached is a picture of the problem and a sample .qvw file
Thanks in advance for your help!
Try this
RangeSum( Only({<[Stage] = {'pre-alpha'}>} [2019 Date (Alpha)]-[2018 Date (Alpha)]), Only({<[Stage] = {'alpha'}>} [2019 Date (Beta)]-[2018 Date (Beta)]) )
Hi!
Just use only one expression:
IF([Stage]='pre-alpha',[2019 Date (Alpha)]-[2018 Date (Alpha)],If([Stage]='alpha',[2019 Date (Beta)]-[2018 Date (Beta)]))
and disable the other ones.
Hope it helps. Bests,
Jaime.
In addition to what @jaibau1993 mentioned, it might make sense to do this using set analysis instead of if statement
RangeSum( Only({<[Stage] = {'pre-alpha'}>} [2019 Date (Alpha)]), Only({<[Stage] = {'alpha'}>} [2019 Date (Beta)]), -Only({<[Stage] = {'pre-alpha'}>} [2018 Date (Alpha)]), -Only({<[Stage] = {'alpha'}>} [2018 Date (Beta)]) )
or
RangeSum( Only({<[Stage] = {'pre-alpha'}>} RangeSum([2019 Date (Alpha)], -[2018 Date (Alpha)])), Only({<[Stage] = {'alpha'}>} RangeSum([2019 Date (Beta)], -[2018 Date (Beta)])) )
Thanks Sunny!
My actual data is a bit more complex, so this helps to keep the formulas clean. I can also see how this would be quite helpful for other situations and I like that it automatically totals the amounts.
One minor problem. When a stage gate date is blank it is still trying to sum. Is there a statement I can add to null out the data with no entries?
Try this
RangeSum( Only({<[Stage] = {'pre-alpha'}>} [2019 Date (Alpha)]-[2018 Date (Alpha)]), Only({<[Stage] = {'alpha'}>} [2019 Date (Beta)]-[2018 Date (Beta)]) )
That is EXACTLY it...thank you!!!
Thanks Jaime,
This worked nicely on my simple formula for a quick fix! It was so obvious I will definitely set it up like that in the future!