Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to create a histogram from my data that selects for only the current date.
Currently, I have this as my "Field":
={<[DATE_FIELD] = {"$(=Date(Today(), 'M/D/YYYY'))"}>} [VALUE_FIELD]
But this isn't filtering out the other dates. Is there another approach I should be taking?
Thanks in advance!
You must use an aggregation function somewhere. Otherwise the set analysis won't work.
For example, you can use this as measure:
={<DATE = {"$(=Date(Today(), 'M/D/YYYY'))"}>} Sum(VALUE)
And you can use this as dimension:
=Aggr({<DATE = {"$(=Date(Today(), 'M/D/YYYY'))"}>} Only(DATE),DATE)
Further, if you have the correct DateFormat in the script, e.g.
SET DateFormat='M/D/YYYY';
then you don't need the formatting function in your set expression. Today() returns the correct format, so you can use
={<DATE = {"$(=Today())"}>} Sum(VALUE)
For the histogram, I'm not seeing any dimensions or measures that I can change. There are only fields, which I can add several to.