Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
0li5a3a
Creator III
Creator III

Legend wrong

hI all.

I need to display in a Bar Cart the total number of the tickets for the last 30 days.I have a field named Severity where I have something like this Severity = S1, S2, S3, S4, S5,etc.

I want to display only the data for the last 30 days for a specific customer and I want to display the days without tickets too.

like below.

Dimensions :

Day

and

= IF( Customer LIKE 'xxx', Severity)

Expressions:

count({< Date = {"<=$(=DATE(MAX(Date)))>=$(=DATE(MAX(Date)-30))"}>}TICKETID)

and

sum(1) I use this to display all the dates with no data so this is blank.

I the below chart the data is selected ok only the problem is with the legend  because I can see all the Severities, there suppose to be just the severities for the last 30 days but in may example are all for example S1 which is from 2 months ago.

Could someone please advise ?

Capture.PNG

21 Replies
0li5a3a
Creator III
Creator III
Author

I made some test data please check the  above attached files.

Anil_Babu_Samineni

How come you say, This is not working. Even though.. you don't have more than 30 Dates in your Model. Does it make sense?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
0li5a3a
Creator III
Creator III
Author

Please check now the new attached files. I just amend them.,

0li5a3a
Creator III
Creator III
Author

please check the new files. the first one they are not the best version.

Anil_Babu_Samineni

Check this?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
0li5a3a
Creator III
Creator III
Author

Well done Anil! Many Thanks!

0li5a3a
Creator III
Creator III
Author

Hi Anil, I have checked now and if for example in the excel files  for the Customer 'ABC' we don't have any severity  the date 29/07/2017 is not displayed.

I attached again the excel files where I made the the above changes.

Could you please advise ?  That was the reason why I used the sum/(1) to be blank, to display the missing dates. But if I do this I would have more data into the legend and this is not right.

Thanks in advance !

Anil_Babu_Samineni

Without testing, I am saying this part like even if you don't have dates foe specific customer that's not a big deal. This will exclude and club the previous one if selection happen

Assume, You have date 1-31. For ABC customer you don't have data for 29th then it excludes and it shows as 1-31 without 29th. That qlik can handle.

Make sense?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
0li5a3a
Creator III
Creator III
Author

I understand your point of view but for a best practice is good to display the missing dates too and the legend to display only the Severities for the last 30 days.