Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
srinivasa1
Creator II
Creator II

get len of fields thats not in current selection

Hi Someone guide me how I can achieve  make value of year month is 0 when its count
is less than 3( bcz Qtr is completed when Fiscal year and Month become 2016/06)

  1. Eg.

I have Fiscal year =2016

Fiscal year Qtr=2017 Q2

Fiscal year and Month =  2016/04

                                           2016/05

                                        2016/06 ( Not be selected as Qtr
is not started yet in that case I need to set flag as 0 otherwise 1

Thx

SD         

10 Replies
sunny_talwar

I am not certain what you trying to do. Would you be able to elaborate please?

srinivasa1
Creator II
Creator II
Author

Thanks Sunny for your reply I wanted set flag as 0 when fiscal year and month list  not make qtr ( I mean we can see only two month for this qtr in list box in my example I will consider qtr only when it have 3 months ).Hope it helps

sunny_talwar

May be like this:

If(GetSelectedCount([fIscal qtr]) >= 3, 1, 0)

If you have selected 3 or more fiscal qtr, the expression will give 1, else it will 0

srinivasa1
Creator II
Creator II
Author

It looks good but I will not select fiscal year and month it based on Quarter selection below year and month fields will filtered and I want count that months fulfills as QTR or not

sunny_talwar

I am not sure what you are trying to do. Is there a sample you can share?

srinivasa1
Creator II
Creator II
Author

Hi Sunny,

Please find below sample screen.

thx

srini

tresesco
MVP
MVP

May be like this?

=Sum(If(MonthEnd(max(total Date))>=Today(), 0, Sale))

srinivasa1
Creator II
Creator II
Author

Thanks Looks like it should work.

swuehl
MVP
MVP

I would suggest to create a flag in the script, based on your financial quarters, probably in a master calendar.

Something like

LOAD

     DateField,

     If( QuarterEnd(DateField,0, $(vFiscalYearStartMonth) ) > Today(1), 0, 1) AS  [QuarterCompleted?],

     ...

Then in your chart:

Sum({<[QuarterCompleted] = {1}>} Sale)


Now you can also use this expression without any quarter selections, e.g. in a chart to show completed quarters with quarters as dimension.