Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
BigSky5829
Contributor II
Contributor II

How to show only one value in a dimension

Hi, let's say I have data that looks like this:

 

Ticket ID Minutes Ticket Closed Status
123456 5 N Ongoing
123456 7 N Ongoing
123456 1 Y Resolved

 

I'm using the UI to try to build a table like this:

Ticket ID Minutes Status
123456 13 Resolved

 

What I am struggling with is how to get the Status.  I'm using this formula: =if([Ticket Closed]='Y',[Status])

 

Result is this:

Ticket ID Minutes Status
123456 1 Resolved
123456 12 -

 

I think I know why my formula is producing those results.  I just don't know what formula I should be using.

Labels (2)
2 Solutions

Accepted Solutions
QFabian
Specialist III
Specialist III

Hi @BigSky5829 , please check if this works for you :

 

example script :

Load * INLINE [
Ticket ID, Minutes, Ticket Closed, Status
123456, 5, N, Ongoing
123456, 7, N, Ongoing
123456, 1, Y, Resolved
123457, 7, N, Ongoing
123458, 1, N, Ongoing
123458, 1, N, Ongoing
123458, 1, Y, Resolved
];

table chart :

QFabian_0-1673980529890.png

chart expression :

if(SubStringCount(Concat([Ticket Closed], '|'), 'Y'), Sum(Minutes))

QFabian

View solution in original post

BigSky5829
Contributor II
Contributor II
Author

I think I got it with this!

 

=SUBFIELD(if(SubStringCount(Concat([Ticket Closed], '|'), 'Y'), Concat([Status], '|',IF([Ticket Closed]='N',0,1))),'|',-1)

 

Thank you for your help!

View solution in original post

7 Replies
QFabian
Specialist III
Specialist III

Hi @BigSky5829 , please check if this works for you :

 

example script :

Load * INLINE [
Ticket ID, Minutes, Ticket Closed, Status
123456, 5, N, Ongoing
123456, 7, N, Ongoing
123456, 1, Y, Resolved
123457, 7, N, Ongoing
123458, 1, N, Ongoing
123458, 1, N, Ongoing
123458, 1, Y, Resolved
];

table chart :

QFabian_0-1673980529890.png

chart expression :

if(SubStringCount(Concat([Ticket Closed], '|'), 'Y'), Sum(Minutes))

QFabian
QFabian
Specialist III
Specialist III

to not show Ticket ID that are not Closed, uncheck this

QFabian_1-1673980602771.png

 

QFabian
BigSky5829
Contributor II
Contributor II
Author

Not quite.  The totals line is adding up correctly but the individual row isn't right.  I also need the status column to be shown, I don't see that in your example.  I'm going to continue playing with this to see if I can get it.

QFabian
Specialist III
Specialist III

Add this expression column :

if(SubStringCount(Concat([Ticket Closed], '|'), 'Y'), 'Resolved')

 

QFabian_0-1673982855135.png

 

QFabian
BigSky5829
Contributor II
Contributor II
Author

It might not always be 'resolved', it could be 'did not replicate' or 'no response from client' or something like that.  I think I might be able to figure it out with the substrings, I'll race you.

BigSky5829
Contributor II
Contributor II
Author

I think I got it with this!

 

=SUBFIELD(if(SubStringCount(Concat([Ticket Closed], '|'), 'Y'), Concat([Status], '|',IF([Ticket Closed]='N',0,1))),'|',-1)

 

Thank you for your help!

QFabian
Specialist III
Specialist III

excellent! @BigSky5829 

QFabian