Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
marieclaire
Creator
Creator

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
Brett_Bleess
Former Employee
Former Employee

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:

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

Help:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

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.  

Regards,
Brett

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.