Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have an issue getting a date variable that's being fed it's value through a calendar object to filter charts by it's value. The variables are vMinDate and vMaxDate. This is the calculated dimension i'm using to filter the chart by the vMinDate information (the chart is titled Make__c. Screen shot attached):
= if(SnapshotDate = date($(vMinDate)) , SnapshotDate)
As you can see in the below screenshot, this is causing a null value to be returned.
Any suggestion on filtering a chart by passing the value stored in a variable into a field selection?
Thanks a lot,
Ron
Date() function just changes the representation of the field, but it won't change the underlying value. To change the underlying value, you need to use Floor function.
What about this -> =If(Num(Floor(SnapshotDate)) = Num(Floor($(vMinDate))), SnapshotDate)
If that does not work either, would you be able to share a small sample?
Try this:
=If(Num(SnapshotDate) = Num(Floor($(vMinDate)), SnapshotDate)
Your vMinDate is actually a timestamp which probably isn't matching with SnapshotDate. But Floor will remove the time part and will just match them on the Date.
Hi Sunny,
=If(Num(SnapshotDate) = Num(Floor($(vMinDate))), SnapshotDate) still returns null. I did see that the value of the variable is not formatted as a date, like the SnapshotDate field. I was hoping to fix that by using Date() in the declaration. It doesn't seem to want to take.
Thanks
Date() function just changes the representation of the field, but it won't change the underlying value. To change the underlying value, you need to use Floor function.
What about this -> =If(Num(Floor(SnapshotDate)) = Num(Floor($(vMinDate))), SnapshotDate)
If that does not work either, would you be able to share a small sample?
Thanks, Sunny!