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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
brettaustin
Contributor III
Contributor III

Exclusion Calculation Total with Filter

Hello community

I have  a text box with a calculation with the intention on displaying the 'current' month's total records where there is a date on one field and not in another.  See following:

=count(DISTINCT {<
[Report Month] = {"$(=Date(max([Report Month])))"},
ActualApprovalDt = {"*"},
ID = e({<ActualStartDate = {"*"}>}),
[Record Type] = {"Y"},
Name = {"*"}
>}
ID
)

The total.. when no selections are applied is accurate ('18').  HOWEVER, when a user selects multiple filters (Actual Approval Date - 11/2 and 11/9) the total updates to an incorrect number ('34').  The number should be '6'.

Any ideas?

Thank you

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

So, when 11/9 and 11/12 is selected, why would you want to see 6 and not 5? ID E151 seems to have an ActualStartDate associated with it, isn't it?

Capture.PNG

If you agree 5 is the right answer, you can try this

=count(DISTINCT {<
	[Report Month] = {"$(=Date(max([Report Month])))"},
	ActualApprovalDt *= {"*"},
	ID *= e({<ActualStartDate *= {"*"}>}),
	[Record Type] = {"Y"},
	Name = {"*"}
	>}
	ID
	)

View solution in original post

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

That is because you are ignoring

ActualApprovalDt selection in your set analysis.

i changed below to get the value you want

=count(DISTINCT {<
[Report Month] = {"$(=Date(max([Report Month])))"},
//ActualApprovalDt = {"*"},
//ID = e({<ActualStartDate = {"*"}>}),
[Record Type] = {"Y"},
Name = {"*"}
>}
ID

sunny_talwar
MVP
MVP

So, when 11/9 and 11/12 is selected, why would you want to see 6 and not 5? ID E151 seems to have an ActualStartDate associated with it, isn't it?

Capture.PNG

If you agree 5 is the right answer, you can try this

=count(DISTINCT {<
	[Report Month] = {"$(=Date(max([Report Month])))"},
	ActualApprovalDt *= {"*"},
	ID *= e({<ActualStartDate *= {"*"}>}),
	[Record Type] = {"Y"},
	Name = {"*"}
	>}
	ID
	)
brettaustin
Contributor III
Contributor III
Author

1.. Yes 5. I miscounted. 

2. Yes.. it works.  THANK YOU!