Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Almagroriano
Contributor II
Contributor II

date between two dates (formula)

Hi,

With my very limited knowledge, I am trying to create a formula between two dates; starting with the minimum value from the date list and the maximum value from the GetFieldSelections selection. 

Appreciate any comments.
Thanks.

Spoiler
Count({<activo={1},[fecha insc]={">=$(date(Min([fecha insc]), 'd-MMM-YY')) <=$(GetFieldSelections(f_mes))"}>} DISTINCT legajo)
1 Solution

Accepted Solutions
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @Almagroriano , you can try:

Count ({<active = {1}, [insc date] = {">=$(=Min([insc date]))<= $(=GetFieldSelections(f_mes))"}>} DISTINCT file)

 

JG

View solution in original post

3 Replies
Almagroriano
Contributor II
Contributor II
Author

this formula on the pivot table works perfect! 

Count ({<active = {1}, [insc date] = {"> = 43644 <= 43921"}>} DISTINCT file)

but; 43644 =  Min ([insc date]) and 43921 = GetFieldSelections (f_mes)

to be dynamic, which is what I am lacking.

help!

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @Almagroriano , you can try:

Count ({<active = {1}, [insc date] = {">=$(=Min([insc date]))<= $(=GetFieldSelections(f_mes))"}>} DISTINCT file)

 

JG

Almagroriano
Contributor II
Contributor II
Author

Hi JuanGerardo,

The solution that you give me, does not give an error, but does not pay attention to the parameters "between" and shows a complete list of dates,

Count ({<active = {1}, [insc date] = {"> = $ (= Min ([insc date])) <= $ (= GetFieldSelections (f_mes))"}>} DISTINCT file)

but I noticed that you added an equals sign before the GetField;

Count ({<active = {1}, [insc date] = {"> = $ (date (Min ([insc date]), 'd-MMM-YY')) <= $ (= GetFieldSelections (f_mes)) "}>} DISTINCT file)

That was a "perfect solution and it worked for me !!"

GRACIAS TOTALES !!!