Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yvonne-c
Creator
Creator

Include Null values

I have the expression below which is working fine - but I also want to include all IDs where Field "MoveOff" is empty - is there a way to add these into my set analysis?

Count({<Dateon={"<31/10/2018"},MoveOff={">01/10/2018"}ID)


Thanks

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

If Eartag is an unique identifier for your table rows then you could use this expression:

 

Count({<
	Dateon= {"<$(=date('31/10/2018'))"},
	Eartag = E( {< MoveOff={"<$(=date('01/10/2018'))"}>})
>}ID)

 

Cheers

Vegar

 

View solution in original post

10 Replies
sunny_talwar

May be this

Count({<Dateon = {"<31/10/2018"}, ID = {"=MoveOff > MakeDate(2018) or Len(Trim(MoveOff)) = 0"}>} ID)
marcus_sommer

Another way:

Count({<Dateon={"<31/10/2018"},MoveOff={(">01/10/2018"|"=len(trim(MoveOff))=0"}>} ID)

- Marcus

sunny_talwar

Marcus, if MoveOff is truly null, then the comparison to Len(Trim(MoveOff)) = 0 won't really work, I think. What do you think?
shwethaa
Contributor III
Contributor III

Try this, it may work!!

Count({$-<MoveOff={"*"}>+<Dateon={"<31/10/2018"},MoveOff={">01/10/2018"}>ID)


marcus_sommer

With empty values it will work but not with NULL because if there is none value respectively NOTHING it couldn't be measured through itself - else an approach like in your example with measuring it with the help of a different field is needed.

- Marcus

Vegar
MVP
MVP

The "problem" with SET is that you can't select something that does not exists. You can't "select" Null() values with your modifer.

What if you instead exclude MoveOff prior to 01/10/2018

```
Count({<Dateon={"<31/10/2018"},MoveOff-={"<=01/10/2018"}ID)
```
yvonne-c
Creator
Creator
Author

Thanks for all the replies - I just can't get it to work though Smiley Sad

Link to some sample data here I hope  CountTest - don't seem to be able to attach excel file?!

 

 

 

Vegar
MVP
MVP

If Eartag is an unique identifier for your table rows then you could use this expression:

 

Count({<
	Dateon= {"<$(=date('31/10/2018'))"},
	Eartag = E( {< MoveOff={"<$(=date('01/10/2018'))"}>})
>}ID)

 

Cheers

Vegar

 

shwethaa
Contributor III
Contributor III

Hey Try below expression. It is working for given data.
Count=4
=Count({-<MoveOff={"*"}>+<Dateon={"<31/10/2018"},MoveOff={">01/10/2018"}>} ID)

-Shwetha