Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
quickqlik2
Contributor II
Contributor II

How do I apply filters to a histogram

I've got data that looks like this, and I'd like to create a histogram showing the number of days "Tickets" have been sitting for customer "A".

Ticket Number Customer Status DateOpened DaysSitting
0001 A Open 2021-11-01 30
0002 A Closed 2021-11-05 26
0003 B Open 2021-11-06 25
...

 

I've disabled "Include Null Values" and wrote this expression for my histogram bars:

=If(Customer = 'A' and Status = 'Open', DaysSitting, Null())

The histogram doesn't work, and I instead get this error:

The chart is not displayed because it contains only undefined values.

What can I do to create a filtered histogram for the conditions I describe?

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Aside from the else condition not being necessary (null() is the default so you could just end the condition after DaysSitting), this works without errors on my end (though the result is less than helpful since it's just a single bar):

Load * INLINE [
Ticket Number, Customer, Status, DateOpened, DaysSitting
0001, A, Open, 2021-11-01, 30
0002, A, Closed, 2021-11-05, 26
0003, B, Open, 2021-11-06, 25
];

Or_0-1638389212546.png

 

View solution in original post

1 Reply
Or
MVP
MVP

Aside from the else condition not being necessary (null() is the default so you could just end the condition after DaysSitting), this works without errors on my end (though the result is less than helpful since it's just a single bar):

Load * INLINE [
Ticket Number, Customer, Status, DateOpened, DaysSitting
0001, A, Open, 2021-11-01, 30
0002, A, Closed, 2021-11-05, 26
0003, B, Open, 2021-11-06, 25
];

Or_0-1638389212546.png