Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Looking for help with Qlik Sense Cloud. I am adding a measure to a bar graph. I have a field (Comment) in my table that only has data in some lines. I only want the graph to display a count on the lines that have a comment. I was trying to write a "When" clause in the expression editor but I cannot seem to get it to work.
As an example, I may have a total of 50 lines but only 4 have data in the Comment field. If I add 2 measures, 1 for total encounters and 1 for comment, I want to see 2 bars in the graph, 1 displaying all 50 Encounters and 1 displaying 4 Comments
Any assistance or suggestions would be greatly appreciated.
HI Steve I will post this in the main Qlik Sense forum to see if we can get you some assistance.
Regards
Mike T
Qlik
Hi Steve, I attempted to play with this - let me know if this works, but we will definitely get you the help you need if this is not what you wanted.
I attached some sample data and the sample app
If using Qlik Sense Desktop please copy .qvf file to your C:\Users\<user profile>\Documents\Qlik\Sense\Apps and refresh Qlik Sense Desktop with F5. If using Qlik Sense Enterprise Server please import .qvf into your apps using the QMC - Qlik Management Console.
click to enlarge
I was using an expression like this for one of the measures:
if (Count(comment) > 0,Count(comment),0)
Let us know how you do.
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Regards,
Mike Tarallo
Qlik
Sorry I made a mistake in the app - I will update the original reply
This does not work because the comment count will always be the number of total lines regardless of whether there is data in the field or not. I am looking to only do the count if there is actual data in the "Comment" field. Example, there are 50 lines of data. Only 4 of those lines have something showing in the comment field. I want the bar to only show a total of 4.
I was trying to do a where or when clause that is something like this:
Count(Comment)
Where(Comment) Is Not Null
I'm using Qlik Sense Cloud
Hi Steve, understood - I reached out to one of our resident experts. They will take a look at the use case for you.
Regards,
Mike T
Qlik
Hi Steve,
I downloaded Michael's Excel sample data and build a sample application in QlikSense Cloud, getting the results you are expecting, see screenshot, my comments expression is Count(Comment), it worked fine for me. Are you missing to share some information about your project?
Hope this helps
Thanks Arnaldo - @Steve - is there anything else we can assist with?
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.
Regards,
Mike Tarallo
Qlik