Hi,
I have the following below code in my gallery which returns a "Yes" in the gallery column Results if all if statements are met.
I need to expand on my if statement that for all "Yes" values I must only get the "Yes" value with the least usage and this will be shown in my Results column as "Yes". So technically I should only have one result.
usage is a column in my gallery although its based on a calculation.
Any help is greatly appreciated
If(ThisItem.INDEX <> CountRows(MyCol),
If(
(Month(ThisItem.MY_DATE) >= 10 ||
Month(ThisItem.MY_DATE) <= 3) &&
(Month(DateValue(Index(MyCol,ThisItem.INDEX + 1).MY_DATE)) >= 10 ||
Month(DateValue(Index(MyCol,ThisItem.INDEX + 1).MY_DATE)) <= 3) &&
Index(MyCol,ThisItem.INDEX + 1).REASON = "25",
"Yes",
"No"
))
All good. Figured it out.
Thanks
Hi @christian12
I responded in depth to your other post of this, can you please answer that one instead of posting another.
This one does not make sense either.
No this does not return Yes if they are ALL true, it returns Yes it 1 is true && .REASON = "25"
And there is no way to tell you , which one of those lines is Less, based on your code. Nor do I fully understand it anymore than your other thread, where I asked for clarifications.
Please dont ignore responses and then post again.
If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others
Cheers
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey