Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Specialist II

## Set Analysis Issue

Hi,

I need to count all [DATA_LIMITE] that >= Today(), but my field are not in Date Format, so i tried with a more simple equacition (just equal), with "If "condition.

If (FLOOR([DATA_LIMITE])=FLOOR(TODAY()), TRUE,FALSE)

With this i got 'true' where need to be 'true', so i tried the same logic to set analysis and did not work like i expected.

I tried use that

COUNT(\${<FLOOR(DATA_LIMITE)={"\$(=FLOOR(TODAY()))"}>}DISTINCT OID_SYSTEM)

Thank you

1 Solution

Accepted Solutions
Specialist

you are right but it will be inside of curly braces

14 Replies
Partner - Champion III

You cant put an expression on the LHS of a set expression qualifier

COUNT(\${<FLOOR(DATA_LIMITE)={"\$(=FLOOR(TODAY()))"}>}DISTINCT OID_SYSTEM)

So if DATA_LIMITE does not have a time component, then use

COUNT(\${<DATA_LIMITE = {"\$(=TODAY())"}>} DISTINCT OID_SYSTEM)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Partner - Master

Not sure when you say that your field is not in date format, but if your if statement works then maybe

COUNT(\${<DATA_LIMITE={">=\$(=FLOOR(TODAY()))"}>}DISTINCT OID_SYSTEM)

(you can't use an expression on the left hand side of the comparison in set analysis, only fields)

Partner - Champion III

If DATA_LIMIT does have a time component (generally not best practice), then you could use

COUNT(\${<DATA_LIMITE = {">=\$(=TODAY()) <\$(=TODAY()+1)"}>} DISTINCT OID_SYSTEM)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Specialist II
Author

Hi Jonathan, Thank you for your time

Not work still bring all OID_SISTEM (204 Distinct Elements)

Here an image of my data

If your code my KPI results is 204, the same of Count(OID_SYSTEM)

Specialist II
Author

Hi Piet!

Thanks for your explanation about can use an expression on left hand side, i didnt know about that.

About your response, the result are the same as Count(OID_SYSTEM) 204, but the right result are 3.

Specialist

I would say

COUNT({\$<P(FLOOR(DATA_LIMITE))={\$(FLOOR(TODAY()))}>}DISTINCT OID_SYSTEM)

or

COUNT({\$<DISTINCT OID_SYSTEM=P(FLOOR([DATA_LIMITE])=FLOOR(TODAY())>}DISTINCT OID_SYSTEM)

Specialist

I see two problems in the code

1 \$ would be inside the {} like {\$<>}

second as Piet said we can't use the expression on the left side of set analyses. (I am not sure  with P() we can use or not so will give it a try and maybe you don't need "" and \$ altogether)

Thanks

Specialist II
Author

Hi Jahanzeb,

Not working too bro.

Specialist II
Author

about the second problem you are right i didnt know about it, lesson to learn, about the first \$ i believe that means the current selection, i could use \$ or 1 or something like that

Tags
Community Browser