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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
warrentk80
Creator
Creator

Size Calculated

Good morning everyone.

I have created a chart in Barre where I as a given dimension (data_esecuzione) and as an expression of a formula that performs calculations on other fields.

in the database I have dates ranging from 2009 to 2016 for which the chart is I have a lot of data.

it is possible to calculate the size in order to consider only the dates ranging from dataesecuzione - 6 months + 12 months from implementation date to today?

thanks

Andrea

1 Solution

Accepted Solutions
maxgro
MVP
MVP

se vuoi limitare la dimensione dataesecuzione puoi usare una dimensione calcolata e poi sopprimerla (flag) quando nulla

=if(dataesecuzione >= addmonths(today(),-6)  and dataesecuzione <= addmonths(today(),12), dataesecuzione)

View solution in original post

4 Replies
anbu1984
Master III
Master III

Use Monthdiff function (Calculating Months difference between two dates)

Use If( MonthDiff(Today(),DateField) <=6 Or MonthDiff(DateField,Today() ) <=12,data_esecuzione)

maxgro
MVP
MVP

se vuoi limitare la dimensione dataesecuzione puoi usare una dimensione calcolata e poi sopprimerla (flag) quando nulla

=if(dataesecuzione >= addmonths(today(),-6)  and dataesecuzione <= addmonths(today(),12), dataesecuzione)

warrentk80
Creator
Creator
Author

Ciao Massimo,

ho replicato la formula che mi hai indicato ed ora tutto funziona regolarmente.

Grazie 1000 per la collaborazione

Andrea

maxgro
MVP
MVP

se la risposta è corretta e/o utile, per favore marcala in modo che gli altri utenti del forum possono infividuarla; grazie