Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

No result for the expression

Hi All , 

I have line charts which works with the below expression :

count({<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>+
<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>}Matches)

 

But when I use the below if condition this dont  give any output the chart goes blank  .Can anyone please suggest me how do I rectify this expression ?

GetFieldSelections(Team)='India',
count({<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>+
<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>}Matches))

Thanks in Advance 

1 Solution

Accepted Solutions
smilingjohn
Specialist
Specialist
Author

Sorry for this 

I have found the reason for this wiered  logic , the filter selection was put into alternative mode  after removing it everything started to work as desired . 

View solution in original post

4 Replies
MayilVahanan

HI

Chart goes blank if you don't select the Team - "India" filter & also, its case sensitive. Please confirm the Team has any capital letter or not. 

And also, hope you've missed the if in ur expression while posting?

If(GetFieldSelections(Team)='India',
count({<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>+
<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>}Matches))

Both set analysis looks like same? 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
PrashantSangle

both condition in set analysis looks same. 

 

as @MayilVahanan  suggested, you are missing "if" and it will get the output only if you select "India" from field "Team"

but if you want to display chart only for team " India" without any selection then you can include that condition inside set analysis also and avoid if. like below

count({<Team={'India'},PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>+
<Team={'India'},PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>}Matches))

 

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
smilingjohn
Specialist
Specialist
Author

Hi Mayil ,

Thanks for the reply , Yes I am using If condition as said below  and I select Team India in a list box ..but this expression dont work . 

If I take out  the statement if(GetFieldSelections(Team)='India and write from count then this works  . 

Just wanted to know why is not If working in this expression ? and sorry again typo errorboth set analysis is used here to consider the null value by using + sign .  and they differ 

if(GetFieldSelections(Team)='India',
count({<PROJECT={'Cricket','Hockey','Wrestling'},CASE_ID-={'null'},STATUS={Active},Year={'>2019'}>+
<PROJECT={'Cricket','Hockey','Wrestling'},Match_ID-={'null'},STATUS={Active},Year={'>2019'}>}Matches))

Thanks

smilingjohn
Specialist
Specialist
Author

Sorry for this 

I have found the reason for this wiered  logic , the filter selection was put into alternative mode  after removing it everything started to work as desired .