Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mohan2391
Creator II
Creator II

Use of Backend Expressions in Qlikview

Hi,

I have an expression "select AVG(dateDIFF(hour, [First Occurred Date] , [Date Time Opened] )) as AVG_TAT_CREATION" in back end(i.e., in SQL) script.

I have a Month field in my data.

Now in front end i need to show a chart with dimension - Month and Expression - AVG_TAT_CREATION

How to define the expression now ?

I tried using Sum(AVG_TAT_CREATION) and avg(AVG_TAT_CREATION), but didn't get the data month wise.

so What is the exact expression i need to use for the calculations which are already defined in back end ?

4 Replies
mohan2391
Creator II
Creator II
Author

Hi,

Let's consider i have a script with 1 of the field as "sum(sales)/avg(sales) as sales".

And in front end, if i want to show a bar chart with ID as dimension and sales as expression, how to define the expression ?

When i tried to take sales as expression, i was not getting any chart

Pls help me earlier..

Thank you

Anonymous
Not applicable

Hi,

It should be sum(sales) in your expression as you have already aggregated in your script.

tresesco
MVP
MVP

After loading the data into qv, how are getting the data? Take a table and put ID and Sales dimensions. Do you see sale values against IDs?

Anil_Babu_Samineni

You may try using preceding load

Load Month,Hour(Interval([First Occurred Date] - [Date Time Opened]),'hh') AVG_TAT_CREATION;

Load Month, AVG_TAT_CREATION FROM DataSource;


Then Create object


Dimension - Month

Expression is Avg(AVG_TAT_CREATION)


And See, How it is visible

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful