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: 
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
Partner - Champion
Partner - Champion

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.

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

May be try this

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

balabhaskarqlik

May be these:

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

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