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: 
Anonymous
Not applicable

pivot and straight table

Hi....

I have two tables one is straight tables and pivot table when i select the perticular row of straight table  the pivot table should be display(like hide and show).

Can any one help me..

Please find following attachment...

when i select calls offered field(its a expression field) in straight table i have to display pivot table.

2 Replies
rubenmarin

Hi chandini, I don't know a way to control clicks on expression, anyway, as a click on expression selects the dimensions associated with that cell, you can set the condional show in design tab like:

GetSelectdCount(Date)=1 and GetSelectdCount(Region)=1 and GetSelectdCount(City)=1and GetSelectdCount(Category)=1 and GetSelectdCount(Subcategory)=1

If you want to hide straight table you can use something like:

GetSelectdCount(Date)<>1 or GetSelectdCount(Region)<>1 or GetSelectdCount(City)<>1 or GetSelectdCount(Category)<>1 or GetSelectdCount(Subcategory)<>1

Peter_Cammaert
Partner - Champion III
Partner - Champion III

One way to accomplish this is to use a macro and a variable (note, this will work in Ajax mode as well). Assume your Straight table has ID = CH01 and your Pivot table has ID = CH02. Do the following:

  • In Settings->Variable Overview, create a variable called vRowsCH01 (change the CH01 part into the real ID of your straight table)
  • Add the following macro in Tools->Edit Module:

Sub NoOfRows

set chart = ActiveDocument.GetSheetObject("CH01")

ActiveDocument.Variables("vRowsCH01").SetContent chart.GetNoOfRows, true

end Sub

Again change CH01 into the real ID of your straight table everywhere.

  • Open Settings->Document Properties->Triggers, select OnAnySelect from the top list and click Edit Actions... next to the list.
  • Add an action of type Run Macro and select macro NoOfRows as the one to run. Close all dialogs
  • Open CH02->Object Properties->Layout and enter the following in the Conditional Show field:

$(vRowsCH01) = 1

Once more, change CH01 into the real ID of your straight table.

That's it.

Peter