Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
VictorBoscaro
Contributor II

Dates in set expression

I have a table like this

VictorBoscaro_0-1622819473156.png

And I want to have a filter in my app that will have the name of the conselour (no_conselheiro) but when selected the filter will be by those dates. The dates will be in a variable, and the variable will be used to filter a card.

I have made a set expression that look like this:

=COUNT({1<ft_processos.dt_julgamento={'>=$(v_dt_inicio_mandato)'}>*<ft_processos.dt_julgamento={'<=$(v_dt_fim_mandato)'}>} ft_processos.nu_processo_sei)

The syntax is correct and the date is being captured by the variables, according to the image below

VictorBoscaro_1-1622819657363.png

But it is returning 0 instead of the number of process that were judged in this period. When I use IF instead of set analysis I get a result, but the result is the number of processes judged by the conselour, and I need the processes that were judged in that time frame.

Any help on how can I solve this?

1 Solution

Accepted Solutions
GaryGiles
Specialist

When using >= in set analysis, you need to use double-quotes " instead of single quotes.

=COUNT({1<ft_processos.dt_julgamento={">=$(v_dt_inicio_mandato)"}>*<ft_processos.dt_julgamento={"<=$(v_dt_fim_mandato)"}>} ft_processos.nu_processo_sei)

 

View solution in original post

2 Replies
GaryGiles
Specialist

When using >= in set analysis, you need to use double-quotes " instead of single quotes.

=COUNT({1<ft_processos.dt_julgamento={">=$(v_dt_inicio_mandato)"}>*<ft_processos.dt_julgamento={"<=$(v_dt_fim_mandato)"}>} ft_processos.nu_processo_sei)

 

VictorBoscaro
Contributor II
Author

I got through this:

=COUNT({1} DISTINCT IF(dt_julgamento >= v_dt_inicio_mandato AND dt_julgamento <= v_dt_fim_mandato, ft_processos.nu_processo_sei))