Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
Using the following expression I'm trying to get the first source (ABC order) with the maximum date (with a URL that is not null):
MinString({<Date={"<=$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Dwell_Heat_Map_URL]-={"-"}>} Source)
This is the list of sources I have
What I get in that case is Camera1112, which is not the min string. I suppose to get airport1 source.
I guess it's something to do with Upper and lower cases.
Can you advise me how to overcome this issue?
Thanks 🙂
Not entirely sure if this helps in anyway... but I created a sample dashboard where I loaded 4 rows that you have showed in the image above
And using the expression that we used before...
MinString({<Date={"$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Common_Path_URL]-={"-"}>} Capitalize(Source))
I got this
Now, if it works for me, I am not sure what you have differently which makes it not work for you, but one thing which is sort of the ordinary is that you load you say that you load your date as DD/MM/YYYY, but display it as MM/DD/YY? I mean this is not too bad, but when it comes to set analysis... things tend to get complicated with the date formats. Set analysis requires you to have the same date format as it was loaded, else it won't work. Are you 100% confident that you load the date as DD/MM/YYYY? One way to change this to load your date like this
Date(Floor(DateField)) as Date
and now just use this
MinString({<Date = {"$(=Date(Max(Date)))"}, [Common_Path_URL]-={"-"}>} Capitalize(Source))
One option is to use this
MinString({<Date={"<=$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Dwell_Heat_Map_URL]-={"-"}>} Capitalize(Source))
Tried this , and also Upper() or Lower().
This options ignore the conditions i set in the set analysis for some reason.
It's bringing me the First Source in ABC order, but that source doesn't have the max date.
Here's a screenshot:
Maybe you can think about another solution?
Thanks!
This is an issue with the set analysis on Date... is your date formatted as DD/MM/YY or DD/MM/YYYY? If it is DD/MM/YY, try this
MinString({<Date={"<=$(=Date(Max(Date),'DD/MM/YY'))"}, [Dwell_Heat_Map_URL]-={"-"}>} Capitalize(Source))
Are you changing the format from the Number's tab here?
Can you check the default format by creating a list box for Date field without any functions
Original format is DD/MM/YY
When i'm using this expression it gives me the maximum date:
MinString({<Date={"<=$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Common_Path_URL]-={"-"}>} Capitalize(Source)) & ' ' & max({<Date={"<=$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Common_Path_URL]-={"-"}>}Date)
but again, i get the wrong source name 😞
I still suspect that using the Capitalize function ignores the set analysis rules.
Oh, I see what is going on... you need this on the Max Date.... Try this
MinString({<Date={"$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Common_Path_URL]-={"-"}>} Capitalize(Source))
Basically, you were looking at MinString on all Dates less than the max date, but it seems you need the MinString on the Max Date itself. Is that right?
@sunny_talwar wrote:Oh, I see what is going on... you need this on the Max Date.... Try this
MinString({<Date={"$(=Date(Max(Date),'DD/MM/YYYY'))"}, [Common_Path_URL]-={"-"}>} Capitalize(Source))Basically, you were looking at MinString on all Dates less than the max date, but it seems you need the MinString on the Max Date itself. Is that right?
Yes, That's exactly what I intended to achieve.
However, the correction you posted isn't bringing any result.
Would you be able to share a sample of your app to show the issue?