Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I read all discussions on this topic, but I couldn't find solution. I'm trying to get number of customer for YTD and Previous YTD, but it seams like condition doesn't work, everytime I get total Count, like it's ignoring set analysis. Here is my code:
COUNT({<Year={$(vMaxYear)},Date={'<=$(vMaxDate)'}>}distinct CustomerID)
COUNT({<Year={$(vPriorYear)},Date={'<=$(vPriorYearDate)'}>}distinct CustomerID)
It's not double quotes and all date variables are returning correct values, I checked that.
Thankyou for your help!
I converted everything from date to numeric values, it’s not best idea, but it works, it seams that for some reason <= didn’t work for dates. I hope this Idea will help someone 🙂
I found problem. <= is not working, but i don’t know how else I can say that I want Date which is less than some other Date 🤔🤔
Hi @Ana9726
Can you try like below
COUNT({<Year={$(vMaxYear)},Date={"<=$(=Date(vMaxDate,'YourDateFormat'))"}>}distinct CustomerID)
It’s not working. When I put just = it works perfectly, but when I put <= It only shows zero.
But It says that expresion is okay. This is what I’m getting with expression you wrote:
count({<Year={2012},Date={“<=03-31-2012”}>}distinct CustomerID)
Thank You for your help!!
I converted everything from date to numeric values, it’s not best idea, but it works, it seams that for some reason <= didn’t work for dates. I hope this Idea will help someone 🙂