Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
shaktisinghchau
Contributor III
Contributor III

Calculation condition in table box

Greetings,

I have a table box where I want to show employees whose has status date in between start and end date variable, I checked all these 3 field has datatype of dates and format is MM/DD/YYYY.

I tried following expression but did not working, my table box is showing data beyond start/end date.

EmployeeStatusDate >= vStartDate and EmployeeStatusDate <= vEndDate

EmployeeStatusDate >= $(=vStartDate) and EmployeeStatusDate <= $(=vEndDate)

1 Solution

Accepted Solutions
shaktisinghchau
Contributor III
Contributor III
Author

Hello Everyone,

Calculation condition in table box or any other chart control will never filter internal data, this calculation condition accept true or false expression and if it true then only show data over table or chart.

To filter internal data of a field make it a dimension and write If expression on top of it, return null in case of false condition and check the "Suppress When Value is Null" check box like I am doing below.

CalculationCondition.png

View solution in original post

11 Replies
dinuwanbr
Creator III
Creator III

Hi Shakthi,

Can you try following date() or date#()

EmployeeStatusDate >= Date(vStartDate,'MM/DD/YYYY') and EmployeeStatusDate <= Date(vEndDate,'MM/DD/YYYY')

if not working is it possible to upload a sample here?

Rgds,

Tharindu

shaktisinghchau
Contributor III
Contributor III
Author

It is not working, thanks for quick response!!

dinuwanbr
Creator III
Creator III

Hi Shakthi,

Is it possible to upload a sample?

Rgds,

Tharindu

prieper
Master II
Master II

Looks like a formatting problem.

When working with dates, it makes often sense to restrict the comparisons on the pure numbers, rather than trying to workaround with different format-settings.

shaktisinghchau
Contributor III
Contributor III
Author

I can not upload qvw it is at client end alos size of the file is huge

shaktisinghchau
Contributor III
Contributor III
Author

Thanks Peter but I have tried via number comparison as well but it did not work...

Peter_Cammaert
Partner - Champion III
Partner - Champion III

AFAIK a Table Box doesn't offer filtering or expression evaluation capabilities. Except for the object itself...

prieper
Master II
Master II

you are correct, have overlooked this condition from the OP

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Usually, Table Boxes can be converted into Straight Tables. And those offer all expression and conditional show tools that you want. The speediest solution would be a straight table with an expression that uses Set Analysis to reduce the number of rows shown...