Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Is your field Site in your data model and has any data in there? can you share a sample app if possible ?
Yes, Site is a field and it does have data.
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.
TOTAL </*Site,*/[Site Mnem], PUVisit_Count)> >= vPUMinVisitCount
Can you delete extra angular brackets. and add more Comma
Did you happen to copy the wrong thing? My original post doesn't have any extra angle brackets.
What is your chart dimensions here?
=if(
aggr(sum( PUVisit_Count ), Site) > 0
,
Left(Site, 10) & '..(' & [Site Mnem] & ')'
,
Null()
)
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()
)
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.