Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate trends in bar chart - assistance needed

I want to calculate revenue per region for future quarters, and  put the results in a bar chart.  From what I've been able to find so far, I think I have to calculate as the data is loaded, not as a calculated dimension while building the chart.  True?    The range functions I think I need don't seem to be available in the list.    Any guidance on steps, or applicable tutorials would be helpful.

Also, I think I need to put forecasted data in different bar chart so I can distinguish....True?  Can't control colors programmatically so the forecasted data looks different?

14 Replies
Michael_Tarallo
Employee
Employee

Hi Linda - I got my simple sample to work using this expression:

if((Country='Germany' and (Ord_date.cal.Year='2009' or Ord_date.cal.Year='2010')),rgb(100,255,245),

if (Country='France' and (Ord_date.cal.Year='2009' or Ord_date.cal.Year='2010'), rgb(200,200,245),

rgb(50,100,245)))

(click to enlarge screenshot)

See attached to the discussion, here is a sample app (.qvf file) - you can see - note you cannot reload it as you do not have the source data

Just copy to your C:\Users\<user profile>\Documents\Qlik\Sense\Apps

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

Hi Linda - just in case you did not see it, our communications crossed - so there is a "possible" solution here.

Let us know when you can.

Regards,
Mike Tarallo
Qlik
Not applicable
Author

Hi Michael,

Looking at the expression, that what I was already able to do, as shown in my earlier message  What if you had more than 3 possibilities that you wanted a different color for.  How would you do it then?

Thanks,Linda

  From: Michael Tarallo <qcwebmaster@qlikview.com>

To: Linda Faust <faust_linda@yahoo.com>

Sent: Monday, February 23, 2015 2:35 PM

Subject: Re: - Calculate trends in bar chart

|

|

Calculate trends in bar chart

reply from Michael Tarallo in New to Qlik Sense - View the full discussionHi Linda - I got my simple sample to work using this expression: if((Country='Germany' and (Ord_date.cal.Year='2009' or Ord_date.cal.Year='2010')),rgb(100,255,245),

if (Country='France' and (Ord_date.cal.Year='2009' or Ord_date.cal.Year='2010'), rgb(200,200,245),

rgb(50,100,245)))

 (click to enlarge screenshot) http://community.qlik.com/servlet/JiveServlet/downloadImage/2-719668-78901/471-346/pastedImage_0.png  See attached to the discussion, here is a sample app (.qvf file) - you can see - note you cannot reload it as you do not have the source data Just copy to your C:\Users\\Documents\Qlik\Sense\Apps   Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction. Regards,Mike TaralloQlik

Reply to this message by replying to this email, or go to the message on Qlik Community

Start a new discussion in New to Qlik Sense by email or at Qlik Community

© 1993-2014 QlikTech International AB | Copyright & Trademarks | Privacy | Terms of Use | Software EULA

Michael_Tarallo
Employee
Employee

Hi Linda - if you had more than 3 possibilities - you could build the expressions as such using nested IF statements, but a better approach might be to use the pick() or match() expressions along with your IF statements.

Pick()

http://help.qlik.com/sense/en-US/online/#../Subsystems/Hub/Content/Scripting/ConditionalFunctions/pi...

Match()

http://help.qlik.com/sense/en-US/online/#../Subsystems/Hub/Content/Scripting/ConditionalFunctions/ma...

Here are a list of conditional functions:

http://help.qlik.com/sense/en-US/online/#../Subsystems/Hub/Content/Scripting/ConditionalFunctions/Co...

Am I understanding the nature of your request correctly?

Regards,

Mike T

Regards,
Mike Tarallo
Qlik
Michael_Tarallo
Employee
Employee

Hi Linda - just curious if you made any progress from my last reply.

Regards,

Mike T

Qlik

Regards,
Mike Tarallo
Qlik