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: 
hlines_usacs
Creator II
Creator II

QlikView Set Analysis

Hello, Below is the set analysis expression we have in a QlikView chart. It had worked previously and now it is broken. I do not know exactly when it broke (ex: after an upgrade,etc.). The second expression does work after removing a field from the TOTAL.

Broken expression:

=if(

  sum(PUVisit_Count) > 0

  and

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >}

  TOTAL <Site,[Site Mnem]> PUVisit_Count) >= vPUMinVisitCount

  ,

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >}

  TOTAL <Site,[Site Mnem]> PUVisit_Count)

  ,

  Null()

)

Removing "Site" from the total makes the expression work:

=if(

  sum(PUVisit_Count) > 0

  and

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >}

  TOTAL </*Site,*/[Site Mnem]> PUVisit_Count) >= vPUMinVisitCount

  ,

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >}

  TOTAL </*Site,*/[Site Mnem]> PUVisit_Count)

  ,

  Null()

)

Any ideas as to why it was working, and then it stopped working? I tried adding in square brackets, copying and pasting the field name and some other things with no luck. Also, please do not ask me to share the qvw.

Any help is appreciated. Thanks!

10 Replies
vishsaggi
Champion III
Champion III

Is your field Site in your data model and has any data in there? can you share a sample app if possible ?

hlines_usacs
Creator II
Creator II
Author

Yes, Site is a field and it does have data.

vishsaggi
Champion III
Champion III

Can you share your app and tell us what is your expected output with some sample? It will be easy to work on it quickly.

Anil_Babu_Samineni

TOTAL </*Site,*/[Site Mnem], PUVisit_Count)> >= vPUMinVisitCount

Can you delete extra angular brackets. and add more Comma

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
hlines_usacs
Creator II
Creator II
Author

Did you happen to copy the wrong thing? My original post doesn't have any extra angle brackets.

sunny_talwar

What is your chart dimensions here?

hlines_usacs
Creator II
Creator II
Author

=if(

  aggr(sum( PUVisit_Count ), Site) > 0

  ,

  Left(Site, 10) & '..(' & [Site Mnem] & ')'

  ,

  Null()

  )

sunny_talwar

Do you even need TOTAL here? seems like you just have 2 fields in the dimension... can you not just use this

=if(

  sum(PUVisit_Count) > 0

  and

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >} PUVisit_Count) >= vPUMinVisitCount

  ,

  sum({<

  [CPT Category]=

  ,[CPT Sub Category]=

  ,[CPT Group]=

  ,[CPT w Desc Ordered]=

  //,Ordering=

  >} PUVisit_Count)

  ,

  Null()

)

hlines_usacs
Creator II
Creator II
Author

It needs to be TOTAL because this expression is named "Total Visits" and then Total Visits is used in other expressions. So this specific expression isn't a line or bar in the chart, but it is used as denominator in the other expressions that are shown in the chart.