Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
julesjohnson
Contributor III
Contributor III

Displaying a value based on another value in a table

I have a table that looks something like this.   In some cases there are multiple cost centers for one phone number.  In these cases, I would like to write an expression that will only show the cost center associated with the status "in Use". In my example below, that would be cost center 879090

Is this possible?

 

NumberStatusCenter
555-555-1711In Use879090
555-555-1711Closed909840
555-555-1711Pending90876544
555-555-1712In Use3788909

Thanks,

1 Solution

Accepted Solutions
sunny_talwar

May be like this

Dimension

Number

Expression

If(Count(Number) > 1, Only({<Status = {'In Use'}>} Center), Only(Center))

View solution in original post

3 Replies
sunny_talwar

May be like this

Dimension

Number

Expression

If(Count(Number) > 1, Only({<Status = {'In Use'}>} Center), Only(Center))

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi,

With the phone number as the dimension, you could use

Concat(Distinct {<Status={"In Use"}>} Center)

julesjohnson
Contributor III
Contributor III
Author

Hi Sunny,

I tweaked it just a bit to fit my actual column names it it worked perfectly!!

if(count(DISTINCT [Cost Center])>1, Only({<Status = {'In Use'}>} [Cost Center]), Only([Cost Center]))

Thanks so much