Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

need hell in writing expression

Hello All,

my requirement is i need to display current , previous score and there respective quarters for all the location..

to achieve this i took bar chart

                              dimension: location,quarter

                            expression:current score: FirstSortedValue(OVERALL_SCR,-ADATE)

                                              previous score:FirstSortedValue(OVERALL_SCR,-ADATE,2)

              by writing this i am getting messed up bar chart (slide 1)

                

later i replace the expression:

            current score:Sum({<ADATE={"$(=max(ADATE))"},YEAR=,QUATERS=,name1=,ENSTEHDAT=>}OVERALL_SCR)

            pervious score:Sum({<ADATE={"$(=max(ADATE),2)"},YEAR=,QUATERS=,name1=,ENSTEHDAT=>}OVERALL_SCR)

i got some wired out put (slide 2)...


last time by writing the second expression(sum()) and adding two dimension it worked out perfectly ,but only thing was see the location fields last time it was only a single field but now it is a common key field,is that because the sum() expression is not work?


please help in writhing down proper expression...


7 Replies
sunny_talwar

Would it be possible to share your qvw?

kunkumnaveen
Specialist
Specialist
Author

sorry for the delay reply

i am trying to attach my qvw which is about 12mb,from lst 20 min

but unfortunately all the time it throwing me error

i think it not possible to attach

is there any other way sunny

amayuresh
Creator III
Creator III

Try this in Bar chart,

Dimesion: EmployeeID ,quarter

Expression:

Current Year =sum(Sales)

Previous Year= sum({1<OrderYear={"$(=Max(OrderYear)-1)"}>}Sales)

1.PNG

Kushal_Chawda

Please reduce the data and try to minimize the size of the application so that it will get attached.

kunkumnaveen
Specialist
Specialist
Author

Hi 

will u please suggest me in writing expression

because i tried even by reducing data ,still its not letting me

kunkumnaveen
Specialist
Specialist
Author

hello ,finally i reduced the file size

kunkumnaveen
Specialist
Specialist
Author

hello

please find my attachment