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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help me with this set expression

Hi There,

I have a calculated dimension in table chart as follows.

=aggr(count(VISIT_MAIN),DRG_BL_VALUE)

In need to include a condition in that dimension to restrict it to those Discharge_Date with values only between the two calender object selections for start date and end date (vDMin and vDMax respectively)

That is, in the above aggr expression, I have to include this condition

Discharge_Date>=vDMin and Discharge_Date<=vDMax

I had given like this : =aggr(count( ( {$<Discharge_Date={">=$(vDMin)<=$(vDMax)"}>} VISIT_MAIN),DRG_BL_VALUE) , but it was not helpful.


Please help me with this.

Thanks

Sircute

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this:

=Aggr(Count({$<Discharge_Date={">=$(=date(vDMin,'M/D/YYYY'))<=$(=date(vDMax,'M/D/YYYY'))"}>} VISIT_MAIN),DRG_BL_VALUE)


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
MayilVahanan

HI

Try like this

=aggr(count( ( {$<Discharge_Date={">=$(=vDMin)<=$(=vDMax)"}>} VISIT_MAIN),DRG_BL_VALUE)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi Mayil Vahanan,

That did not work

MayilVahanan

HI

Can you provide a sample?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hello Mayil

I have created a sample scenario here.

Please find the attached excel sheet  (source) and qlikview file

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this:

=Aggr(Count({$<Discharge_Date={">=$(=date(vDMin,'M/D/YYYY'))<=$(=date(vDMax,'M/D/YYYY'))"}>} VISIT_MAIN),DRG_BL_VALUE)


talk is cheap, supply exceeds demand
Not applicable
Author

Gysbert,

That helped

So, it was all beacuse of the date format mismatch !!!

Thanks a lot !

Need one more help.. In the main dashboard which I am doing at the client side (which i cannot share here) , is in qv 11. The calendar object in there has months and years displayed in a different font. I donot know where to change this.

Calendar.bmp

Can you tell me where should I go and change this font for month and year in calender object ?