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

Avarage value in straight table is not working

Hi

I ahve scenario,

I need to show records of latest month in straight table.

In that i need show trend of last 6 months and 3 months based on user selection of rate column.

I am not bale to show trend of last 3,6 months ,Please guide me for that.

Please do the needful

1 Solution

Accepted Solutions
sunny_talwar

May be one of the two expression, with just Country as dimension

Dimension

Country

Expression

1) =Sum({<YearMonth={"$(=Date(MakeDate(2017, 4, 25), 'YYYY/MM/DD'))"}>} Sales)

2)

    Option 1

    =AVG({<YearMonth={"$(='>=' & Date(AddMonths(Date(V_DB_Max_date),-(Value-1)), 'YYYY/MM/DD') & '<=' & Date(V_DB_Max_date, 'YYYY/MM/DD'))"}>} Rate)/100

    Option 2

    =AVG({<YearMonth={"$(='>=' & Date(AddMonths(Date(V_DB_Max_date),-(Value-1)), 'YYYY/MM/DD') & '<=' & Date(V_DB_Max_date, 'YYYY/MM/DD'))"}, Rate = {'>0'}>} Rate)/100

View solution in original post

16 Replies
qlikview979
Specialist
Specialist

Hi,

please check in  Variable(V_DB_Max_date) is not working,if u want check in input Box.

do  like this V_DB_Max_date==max(YearMonth)

qlikview979
Specialist
Specialist


sorry

do like this

V_DB_Max_date=max(YearMonth)


may i know the logic for avg.

Not applicable
Author

Hi Mahesh,

After adding '= '  in variable then text object is working but straight table in not working.

Logic is end user wnt to see the trend of last couple of months based on his selection .

Thanks

Thiru

sunny_talwar

Can you rerun the application and see if it works... made some script changes

Not applicable
Author

Hi Sunny,

Here also in text box it is working and straight table (Trend column) it is not working.

Might be

Cause:i am taking only latest column in dimension formula.

Please do the needful

Thanks

Thiru

sunny_talwar

Can you attach the refreshed version of the app (with my changes)

Not applicable
Author

Hi Sunny,

Please find the attachment with rerun data

Thanks

Thiru

sunny_talwar

Do you expect to see 0.04 for IND?

Capture.PNG

Not applicable
Author

Hi Sunny,

yes.

But it should be vary as per the value selection i.e. 3 and  6 and 9 .

how it is changing in text box same way it needs to be change in straight tabel.

Regards

Thiru