Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a numeric field like this for a date: 202101 , 202102, 202103, 202104.
I used this formula that works in qlik view to have the current month: =Max(Date(Date#([YYYYMM (Anno - Mese)], 'YYYYMM'), 'YYYYMM'))
I put this formula in qlik nprinting filter but it doesn't work, why?
How can I do?
Thank you
It does not matter what works in QlikView in this case...
QlikView may apply this formula as text search (not a numerical value search), on the other hand NPrinting is looking for numerical value (which i explained in my post I have given you link to in my post above)..
So again - what is the field value if you put it in the table and use expressions like:
If values are the same for text and floor/number then your formula is simply wrong. At the same time I would say you just overcomplicated it as you could simply use:
Now I will say it again - we MUST know how this field is loaded and understand what datatype it inherits in order to give you 100% accurate answer.
cheers!
Hi,
Did you selected "Evaluate Value" on the drop down menu? https://help.qlik.com/en-US/nprinting/February2021/Content/NPrinting/ReportsDevelopment/Static-dynam...
Best Regards,
Ruggero
Hi,
@Ruggero_Piccoli yes but it doesn't work, I tried with evaluate value and advance research but they don't work
Hi - there is obvious change of type of data you are doing and value change too...
you are saying that you have numerical field with values like: 202101,202102... which i take means that they are actual numbers? aren't they?
so when you you use Date# you are converting it to completely different values being: 44197 (for 202101), 44228 (for 202102)
It is basic understanding what Date# and Date function does to the numbers. This is all documented in help documentation. Please make sure you read examples from that help too...
Then you may want to read this post about most common pitfals re date filtering in NPrinting to complement the topic https://nprintingadventures.com/2019/02/15/the-pitfalls-of-nprinting-filters-part-1-dates-and-duals
If this still does not help then next question is how you create your 202101, 202102 in Qlik script to understand what value is hidden behind the symbol value!
cheers
Hi @Lech_Miszkiewicz , that formula works in qlik view and gives me 202104, the original field is a numeric field, so which formula should I use in nprinting filter to have the current month for this field?
Thanks
It does not matter what works in QlikView in this case...
QlikView may apply this formula as text search (not a numerical value search), on the other hand NPrinting is looking for numerical value (which i explained in my post I have given you link to in my post above)..
So again - what is the field value if you put it in the table and use expressions like:
If values are the same for text and floor/number then your formula is simply wrong. At the same time I would say you just overcomplicated it as you could simply use:
Now I will say it again - we MUST know how this field is loaded and understand what datatype it inherits in order to give you 100% accurate answer.
cheers!
To add one more comment regarding syntax. I would also looked at other filters you are applying and depending if Max(your date) needs to return max for intersection (or not?) with other selections you may also use set analysis as an optional parameter: