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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

ignore selection on list box other value

Hi ,

I have a List box Value as Flag Containing Values .. Like Primary A, Primary B , Secondary B.

I Have a Exp for 3 KPI

Primary A : =fabs(Sum({$<Flag={'Primary A'},FiscalYear = {$(=Max(FiscalYear))},[Posting Date] = {'<=$(=Max([Posting Date]))'},FiscalQuarter=,FiscalMonth=,MonthYr=>}Sales))

Primary B: =fabs(Sum({$<Flag={'Primary B'},FiscalYear = {$(=Max(FiscalYear))},[Posting Date] = {'<=$(=Max([Posting Date]))'},FiscalQuarter=,FiscalMonth=,MonthYr=>}Sales))

Secondary B: =fabs(Sum({$<Flag={'Secondary B'},FiscalYear = {$(=Max(FiscalYear))},[Posting Date] = {'<=$(=Max([Posting Date]))'},FiscalQuarter=,FiscalMonth=,MonthYr=>}Sales))

But when i am selecting list box field. Other Kpi Value .. How to Avoid this...

5 Replies
brijeshvma
Partner - Creator
Partner - Creator
Author

Hi ,

But when i am selecting list box field. Other Kpi Value get Change .. How to Avoid this...


sunny_talwar

Check it out now

hemhund2016
Creator
Creator

Use the expression as below.

=fabs(Sum({1<Flag={'Primary A'},FiscalYear = {$(=Max(FiscalYear))},[Posting Date] = {'<=$(=Max({1}[Posting Date]))'},FiscalQuarter=,FiscalMonth=,MonthYr=>}Sales))

You need to use the {1} in the Max Posting date in set analysis.

Thanks,

Hemanth.

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny Thanks for Reply ,

its Working , But can u tell me I want to create a Variable for YTD , MTD QTD And WTD..

Set vCurrentSet =

Replace(

if([%Period_Type]='WTD', 'WeekID={"$(=Max(WeekID)-1)"},Date={"<=$(=Max(Date))"},[Day (#)]=,[Week#]=,Month=',

if([%Period_Type]='MTD', 'MonthID={"$(=Max(MonthID))"},Date={"<=$(=Max(Date))"},[Day (#)]=,Week#=',

if([%Period_Type]='QTD','FiscalYear={"$(=Year(Max(FiscalYear)))"},QuarterID={"$(=Max(QuarterID))"},Date={"<=$(=Max(Date))"},FiscalMonth=,[Day (#)]=,MonthlyWeekNumber=',

if([%Period_Type]='YTD','FiscalYear={"$(=Max(FiscalYear))"},Date={"<=$(=Max(Date))"},FiscalQuarter=,FiscalMonth=,[Day (#)]=,MonthlyWeekNumber=',

'FiscalYear={"$(=Max(FiscalYear))"}'

))))

,chr(34),chr(39)) ;

And i am Writing an Expression like

fabs(Num(SUM( {$<$(vCurrentSet),Flag = {'Primary EBO'}>}[Sale]) ...

So where do i Put $(=Max({<Flag={'Primary A'}>}FiscalYear)) This Condition ....

brijeshvma
Partner - Creator
Partner - Creator
Author

Hi Sunny ...

Sry my Qlikview is not working i created same updated question in Qliksense...

can u check and plz tell me solution...

Thanks in Advanced