Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
So I need to do a count on a set of data. Here's a line of code that works for me and that returns the right result, which is a value of 132.
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=08.03.2019"} >} Distinct(Article))
I need to make the tblCommande_Dt_orig_ch_FORMATTED condition more dynamic, so I tried using the Today() function, like so:
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(Today() - 3)"}>} Distinct(Article))
And yet, this line returns a count of 133. I've checked and "Today() - 3" returns 08.03.2019 which should be correct.
Does anyone know if I have an error in my syntax?
Thank you,
LesJean
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=date(Today() - 3))"}>} Distinct(Article))
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {">=$(=date(Today(),-3))"}>>} Distinct Article)
This:
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=Today() - 3)"} >} Distinct(Article))
or this:
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=Date(Today() - 3), 'DD.MM.YYYY)"} >} Distinct(Article))
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=date(Today() - 3))"}>} Distinct(Article))
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {">=$(=date(Today(),-3))"}>>} Distinct Article)
This:
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=Today() - 3)"} >} Distinct(Article))
or this:
Count({<tblCommande_QteBO = {">0"}, tblArticleBO_StoreLoc = {'1000'}, tblCommande_Dt_orig_ch_FORMATTED = {"<=$(=Date(Today() - 3), 'DD.MM.YYYY)"} >} Distinct(Article))
Thanks to all 3 of you guys, these solutions work!