Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table with 2 State as dimension

Hi, !

I try to compare two differents selections of the same field.

For that I build two table with two differents states, that work well but now i'm trying to keep only one table.

Which looks like that :

  

libvalue Tvalue%
State 1B1217610.53
State defaultA & B2217610.49

I dunno how I can make a dimension with several several state or even if it's possible.

If someone have any tips it would be great!

I made a small application, which could help you to understand my request.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

6 Replies
avinashelite

Handel this in the set analysis ...try like below examples

[State Identifier] and ::

Function({[state_identifier1] <field_name2= [state_identifier2]::field_name3>}field_name)

Set values for field_name2 within [state_identifier1] basedon values of field_name3 in[state_identifier2]

e.g. sum({Group1}  <Year=$::Year> Sales)

e.g. avg({MarketDev} <Year={BaseLine}::Year,Category={Global}::ProductCategory>SalesLeadTime


Achieving the same thing with 2 differentsyntax:


Option 1 - sum({[Group 1]<Region =$::Region, [Sales Rep] = $::[Sales Rep], Path = $::Path, Year= $::Year, Quarter = $::Quarter, Month = $::Month>} Sales)


Option 2 - sum({$<[Product Sub Group]= [Group 1]::[Product Sub Group] >} Sales)

Not applicable
Author

Thanks for your quick answer,

It seems you didn't understund my request, probably due to my poor english.

Tell me if i'm wrong, but your solution allow to set one field at state1 with the value of the same field at state2.

I'm currently trying to show Expressions at State1 AND State2 on differents row of the same table.

avinashelite

Sorry got your requirement , according to me its not possible because we don't have a function to get the current selection of a field based on the Alternate states so that we could enable the field based on the State selections ...

tresesco
MVP
MVP

Like this?

Capture.PNG

avinashelite

Woo!!

tresesco‌  nice your handling this using value list but what if we select A in both the States ? it will count A twice rite

Not applicable
Author

I just changed few things, and It's work perfectly.

Thank to both of you !