Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

julesjohnson
New Contributor II

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

Re: Displaying a value based on another value in a table

May be like this

Dimension

Number

Expression

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

3 Replies

Re: Displaying a value based on another value in a table

May be like this

Dimension

Number

Expression

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

karthiksrqv
Contributor II

Re: Displaying a value based on another value in a table

Hi,

With the phone number as the dimension, you could use

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

julesjohnson
New Contributor II

Re: Displaying a value based on another value in a table

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

Community Browser