Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shakil4sk
Contributor
Contributor

how to change dimension field value dynamicaly in Straight Table?

Hi,

I have created a straight table of sales by customer where customer is 'xyz'. i need to change dynamically customer dimension field value in set analysis when i select a particular customer from customer dimension. i also need to change chart title dynamically with same customer name.

i achived the second one with this in window title

=If(IsNull(Customer), 'Sales By All', 'Sales by '& Customer)

But i stuck in first one. please help?

Thanks in advance.

8 Replies
sunny_talwar

What is the expression that you have where you are looking to modify the set analysis?

trdandamudi
Master II
Master II

Can you provide your expression for the first one..

shakil4sk
Contributor
Contributor
Author

Thanks for reply,

Expression is:

Sum ({$<Customer={XYZ}, Year={2014}, Month={Jan} >}Value)

I need, when i select a customer in listbox, the customer XYZ in set analysis dynamically changed into selected one.

sunny_talwar

May be try this:

Sum ({$<Customer=p(Customer), Year={2014}, Month={Jan} >}Value)


or


Sum ({$<Year={2014}, Month={Jan} >}Value)


or


If(GetSelectedCount(Customer) = 1, Sum ({$<Year={2014}, Month={Jan} >}Value))

Not applicable

Remove the customer field from the set analysis

shakil4sk
Contributor
Contributor
Author

Thanks to the both of you,

second one is working.

tresesco
MVP
MVP

May be this:

If( GetSelectedCount(Customer)>0, Sum({<Year={2014}, Month={Jan} >}Value), Sum ({$<Customer={XYZ}, Year={2014}, Month={Jan} >}Value))



This expression will return value for Customer 'XYZ' when no customer is selected, otherwise it returns value for selected customers.


sunny_talwar

If you got what you were looking for, would mind closing the thread by marking correct and helpful responses

Qlik Community Tip: Marking Replies as Correct or Helpful