Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
This one is going to come off as pretty dumb, but I'm forgetting something or skipping something simple in my expression.
All I want is the count of IDs, with the maxDate as the expression. But I'm not sure how to set up that expression with the function in it, and finding proper syntax within the community is far from easy.
So imagine the regular count of IDs:
=count(distinct ID)
I'd like the count to be for the maxDate only, either using a variable set to max(theDate) or the function within the expression itself, something like:
=count({<theDate = max(theDate)>} distinct ID)
this syntax is wrong, I know, but I'm not sure what to add/take away to make it function properly. Any help?
Thanks
May be this
=count({<theDate = {"$(=Date(Max(theDate), 'YYYY-MM-DD'))"}>} distinct ID)
Try to write
=count( { < theDate = {$(=max(theDate) ) } >} distinct ID)
Actually try this
=count( { < theDate = {'$(=Date(max( theDate )) )' } >} Distinct Doc_name)
Or
=count( { < theDate = {'$(=Date(max( theDate )) )' } >} Doc_name)
Or
=count( { < theDate = {$(=max(theDate) ) } >} distinct Doc_name)
I'm getting 0 as the result, I've attach the simplified qlik to my original and maybe you can write the expression until it works?
I have inline loaded the dates as exactly the dates numbers... so they may need to be reformatted I suppose. Perhaps that's an issue as well. Sorry
Creating the maxDate as a variable and using that would also be totally fine.
May be this
=count({<theDate = {"$(=Date(Max(theDate), 'YYYY-MM-DD'))"}>} distinct ID)
nailed it, thanks Sunny!
Ok it is date format issue
Try and see attached also
=count({< theDate = { '$(=max(theDate))' }>} distinct ID)
Did you check my reply as well.