Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
Qlikview is saying there an Error In Expression for the following expression:
=If((Approval_Year='2017', SUM(SAN))
If(Approval_Year='2017',SUM(NAS))
If(Approval_Year='2017', SUM(Backup)))
Qlikview puts a red squiggly line under the comma right after the first '2017'. I believe I have all the parentheses matched up.
What I'm trying to accomplish is to Sum the SAN, NAS or Backup values and then hopefully group them by CIO in a Bar chart. The grouping I'll worry about after getting the expression fixed, though I'm open to any suggestion on that piece too. Finished product would look similar to the following:
CIO | ||||||
Backup | ||||||
Smith | NAS | |||||
SAN | ||||||
Jones | ||||||
Adams | ||||||
0 | 10 | 20 | 30 | 40 | 50 |
As always, any and all help is appreciated. Thanks in advance.
That expression will not work since Approval_Year is true for all three possibilities, so only the first Sum() will be calculated. Then, why not just use the Sum(Field) in three different expressions, dimension being CIO?
Try this?
= If( Approval_Year='2017', SUM(SAN),
If( Approval_Year='2017', SUM(NAS),
If(Approval_Year='2017', SUM(Backup))))
syntax is
if (
condition, expr(),
if(
condition, expr(),
if (
condition, expr()
)
)
)
=If(
Approval_Year='2017', SUM(SAN),
If(
Approval_Year='2017',SUM(NAS),
If(
Approval_Year='2017', SUM(Backup)
)
)
)
see attached sample,
hope this helps
That expression will not work since Approval_Year is true for all three possibilities, so only the first Sum() will be calculated. Then, why not just use the Sum(Field) in three different expressions, dimension being CIO?
You can also try set analysis
=Sum({<Approval_Year = {2017}>} SAN)
=Sum({<Approval_Year = {2017}>} NAS)
=Sum({<Approval_Year = {2017}>} Backup)
Thank you Vishwarath for your reply. I appreciate it. Your response solved the expression error, but a couple of other responses solved the whole problem. Again, thank you for replying.
Hello Frank:
Thank you for your response. I wish I could give credit for more than one correct answer, but I cannot. Your response is very close to solving the whole issue, but as it turns out, I don't need to do the Approval Year with CIO dimension. I can leave CIO as is. To be fair, it's probably due to the way my data is set up which I did not supply example of. Again, thank you very much for your response.
Thank you Miguel. I was over complicating it again. Sigh. I appreciate your help and your suggestion works perfectly. Thank you very much.