Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
data_RN
Creator
Creator

How to Hide Calculated Expression in Bar Chart

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!

1 Solution

Accepted Solutions
sunny_talwar

Try this

RangeSum(
Only({<[Stage] = {'pre-alpha'}>} [2019 Date (Alpha)]-[2018 Date (Alpha)]),
Only({<[Stage] = {'alpha'}>} [2019 Date (Beta)]-[2018 Date (Beta)])
)

View solution in original post

6 Replies
jaibau1993
Partner - Creator III
Partner - Creator III

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.

 

sunny_talwar

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)]))
)
data_RN
Creator
Creator
Author

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?

 

sunny_talwar

Try this

RangeSum(
Only({<[Stage] = {'pre-alpha'}>} [2019 Date (Alpha)]-[2018 Date (Alpha)]),
Only({<[Stage] = {'alpha'}>} [2019 Date (Beta)]-[2018 Date (Beta)])
)
data_RN
Creator
Creator
Author

That is EXACTLY it...thank you!!!

data_RN
Creator
Creator
Author

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!