Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkumargowda
Creator
Creator

getfieldselections in calculated dimension

Hi All,

I have 2 month fields, one is created month and the other is due month.  I have a list box which shows created month and a bar graph with sum(sales) in y axis and due month in x axis.

Now what I need is, my bar graph should show only for months (due month), for which user selects in list box (created month). How can I achieve this using getfieldselections(created month)

1 Solution

Accepted Solutions
sunilkumarqv
Specialist II
Specialist II

hopes this will helps you

if(getselectedcount(due month)>0,if(due month=created month,due month))

View solution in original post

10 Replies
sunilkumarqv
Specialist II
Specialist II

Please try below

if(Getselectedcount(Created month)>0,[due month],[created  month])

or

if(Getselectedcount(Created month)>0,[due month],'No Dimension')

manojkumargowda
Creator
Creator
Author

Hi Sunil,

This is not what I wanted. If a user selects January and march in list box (created month), bar graph should show only for January and march (due month).

bwisealiahmad
Partner - Specialist
Partner - Specialist

Another suggestion is:

Sum({<[CreatedMonth] = {'$(=GetFieldSelections([CreatedMonth]))'}>}Sales)

And you use DueMonth as Dimension.

Good luck!

agigliotti
MVP
MVP

maybe for your bar chart dimension you could use:

if( [due month] = [created month], [due month] )

and untick "Include null values"

I hope it helps.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
manojkumargowda
Creator
Creator
Author

Hi Ali,

Measure is fine. I don't want to put any filter in that. Instead of showing all the values of created month in bar graph, I just want to show only selected (through list box) due month.

Hope I made my question clear.

bwisealiahmad
Partner - Specialist
Partner - Specialist

Maybe you could share an example?

From what I understood you want to show some measure for the DueMonths? And the DueMonths you show is based on which CreatedMonth are selected?

sunilkumarqv
Specialist II
Specialist II

hopes this will helps you

if(getselectedcount(due month)>0,if(due month=created month,due month))

sunny_talwar
MVP
MVP

May be try this

Sum({<[due month] = p([created month]), [created month]>}sales)

BalaBhaskar_Qlik
Master
Master

May be these:

=Sum({$<[Due Month] = {'$(=GetFieldSelections([Created Month]))'}>}Sales)

=Sum({$<[Due Month] = p({<[Created Month]=>})>}Sales)