Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 

Previous Month - why does this syntax not work ?

Hi the community,

I face a problem of syntax, in this set analysis :

count( DISTINCT {<Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-1))"} >} id_content)

I need to  get the  previous month production,with no selection. 


Here are the formulas that work  :

Production = count(DISTINCT id_content)

Previous month = Addmonths(Max(Date.AnnéeMois),-1)

Number of days of current month :
( max( { <Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-0))"}> } @CLE_Date)
- min( { < Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-0))"} > } @CLE_Date)+1)

Production of current month :
(count(DISTINCT { < Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-0))"} >} id_content))

Number of days of previous month :
( max( { <Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-1))"}> } @CLE_Date)
- min( { < Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-1))"} > } @CLE_Date)+1)
( max( { <Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-0))"}> } @CLE_Date)
- min( { < Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-0))"} > } @CLE_Date)+1)


Have you any idea about this syntax, and why it does not work ?
(count(DISTINCT { < Date.AnnéeMois.nom = {">=$(=Addmonths(Max(Date.AnnéeMois.nom),-1))"} >} id_content))



Thank you for your help.



1 Reply

I do not have a direct answer for you on this one, but I do have a couple of links that may help you:

Design Blog:


Sorry I am not more help, my post will kick things back up too, so maybe someone else will be able to offer you something better.  


To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.