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: 
IAMDV
Luminary Alumni
Luminary Alumni

Dynamic Dimension on Charts using $Field

Dear All,

I have many dimensions in my report and there is space constraint on the design layout. So we had decided to show only 4 dimensions at any given time. I mean 4 pie charts with same expressions. And I am using the SYSTEM TABLE FIELD - $Field for displaying the list of dimensions. And below is my chart expression...

Chart Dimension Expression : =($(=$Field))

Chart Expression : COUNT({$} Resp_ID)

This works fine for the first chart. Now I wanted to simulate for the 2nd, 3rd & 4th charts. I mean I thought I could use SET IDENTIFIER ($_1) for the 2nd Chart and then ($_2) for the 3rd Chart...

However I can't use the SET IDENTIFIER in my Chart Dimension Expression : =($(=$Field)). Please can someone help me on this? Or please suggest a better appraoch if any...

Many thanks in advance.

Cheers - DV

1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

Hi, DV

That's good that you found another solution.

If you need to use that kind of expression again, the syntax is more like:

SUM ( $(=ONLY({$1}$Field))) to get the last selection on $Fields instead of $_1 which will give you the next selection (!!!!) - in the case you used the back button.

Regards,

Erich

View solution in original post

11 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi DV,

          You can use "Container"  for showing different pie charts at same position. This way you can save the space.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
IAMDV
Luminary Alumni
Luminary Alumni
Author

Hi Kaushik,

Thanks for the quick response. We are not using Version 10 yet. We are still on QV9 with SR7. And its not just saving the space, it is more about comparing multiple dimensions across same facts. So I thought I can use the $Field for business users to select the specific dimensions and compare the results based on their needs.

I thought I can use something like this... ONLY({$_1} $(= [$Field])) - which doesn't work in my case. Or is there a function to identify the 1st, 2nd, 3rd....etc selection on specific field?

Many thanks again for your time.

Cheers - DV

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    I am uploading one document, pls have a look and tell me is this what u want

Regards

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
IAMDV
Luminary Alumni
Luminary Alumni
Author

Kaushik - Thank you again. Yes, but I need more than this... explaining you in more detail based on your example.

If you paste this =($(=$Field)) expression in your chart dimension and then select one value from $Field list box, you would see the data in the chart expanded/breakdown for that dimension. This is what I have done so far... Now I want to copy the same chart 3 times and I wanted to show the breakdown for 3 more selections in $Field list box.

So lets assume I select Clients (as first selection) the 1st chart should show the data related to clients... and then I select Consulting and the 2nd chart should show the data related to consulting... same for the 3rd & 4th selections.

And if I dont select anything, then it should not show any charts.

Hope this makes sense.

Cheers - DV

IAMDV
Luminary Alumni
Luminary Alumni
Author

All I am trying is to use the Dollar Sign Expansion with Set Identifiers. But I can't get the syntax right

Thanks - DV

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     It can be possible with the help of macros.

     I need some input from your side.

     Tell me onething how will you restrict user to show charts.

           Meaning he may select all fields, so how u have decided to limit that

     And do you want chart to disappear with selection cancelled.

     It may take time to develop with macro, but yes its possible

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
IAMDV
Luminary Alumni
Luminary Alumni
Author

Hi Kaushik,

Its like you are reading my mind   I am just referring the API guide to write VB Script.

Here are answers to your questions:

Question : Tell me onething how will you restrict user to show charts.

           Meaning he may select all fields, so how u have decided to limit that

Answer : Let the users select all the fields however they will only see first 4 selections in the chart

Question : And do you want chart to disappear with selection cancelled.

Answer : We haven't decided on this bit, for now let's consider that charts will disappear.

Many thanks again for your time. Let me know if you can get this working.

Cheers - DV

erichshiino
Partner - Master
Partner - Master

Hi, DV

That's good that you found another solution.

If you need to use that kind of expression again, the syntax is more like:

SUM ( $(=ONLY({$1}$Field))) to get the last selection on $Fields instead of $_1 which will give you the next selection (!!!!) - in the case you used the back button.

Regards,

Erich

Not applicable

Hi DV,

By the time i tried to find the solution and work on the sample document to post here, Erich has suggested the solution which i had on my mind.

Have a look at the attched application.

Hope this helps you.

- Sridhar