Skip to main content

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ameya09
Partner - Contributor III
Partner - Contributor III

Restrict data on all selections except one field selection

Hi All,

 

Below is my expression :  I want to restrict this value on month field selections but should work on YEAR selection. I tried restricting using MONTH= but it is not working

 

(((sum({<ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[ACTUAL COST])//,month([EXPENDITURE DATE]))
/
sum({<ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},baseline_flag={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[BUDGETED AMOUNT]))
*
sum({< ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[CONTRACTUAL AMOUNT]))
-
(sum({<ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[ACTUAL COST])))
/
((sum({<ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[ACTUAL COST])//,month([EXPENDITURE DATE]))
/
sum({<ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},baseline_flag={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[BUDGETED AMOUNT]))
*
sum({< ProjectFlag={'Y'},EXPENDITURE_FLAG={'Y'},PROJECT_START_MONTH={"<=$(=addmonths(monthend(max(CALDATE)),1))>=$(=yearstart(monthstart(max(CALDATE))))"},MONTH=>}[CONTRACTUAL AMOUNT]))

 

Please help.

Thank you.

Labels (1)
1 Reply
Digvijay_Singh

I think you need copy your set expression for max(CALDATE) as well, I think all aggregate functions should have the set modifiers else it might give unpredictable results.