visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

OR option in MAsk

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
khickey



Joined: 13 Jul 2011
Posts: 22

PostPosted: Tue Feb 12, 2013 4:39 am    Post subject: OR option in MAsk Reply with quote

Hey

I have a column where data is coded as one of 17 different location codes (in plain text). I want to be able to chose combinations of locations to plot in a box & whisker plot. The mask option only allows "AND" operations. Is there a way to use an "OR" operation with masking?

Thanks
Cheers
Ken
Back to top
View user's profile Send private message
David
Site Admin


Joined: 25 Nov 2006
Posts: 1966
Location: Chapel Hill, NC

PostPosted: Tue Feb 12, 2013 10:28 am    Post subject: Reply with quote

I've thought about this before. I can see a way to add a switch between "and" and "or". I don't see a way to make a "(A and B) or (C and D)" without making the UI a lot more complicated. There is a way around that now by using the expression column.

David
Back to top
View user's profile Send private message Send e-mail
David
Site Admin


Joined: 25 Nov 2006
Posts: 1966
Location: Chapel Hill, NC

PostPosted: Tue Feb 12, 2013 12:56 pm    Post subject: Reply with quote

I think I have a consistent solution to this. Download the latest beta.

David
Back to top
View user's profile Send private message Send e-mail
khickey



Joined: 13 Jul 2011
Posts: 22

PostPosted: Tue Feb 12, 2013 4:16 pm    Post subject: AND and OR? Reply with quote

Hey David

The Beta works great! Any chance of having AND operators added at a level eblwo the OR operator? I'd like to plot combinations of data, each filtered to satisfy some criteria (I filter using the "AND" operator in the Maks tool).

cheers
Ken
Back to top
View user's profile Send private message
David
Site Admin


Joined: 25 Nov 2006
Posts: 1966
Location: Chapel Hill, NC

PostPosted: Tue Feb 12, 2013 4:51 pm    Post subject: Reply with quote

If the columns are A,B,C,... what type of statement

(A=="a" or A=="b") and ..

are you trying to do. Note that even though

A and B or C and D

can be defined, it's not clear to me that it is obvious what the implicit parenthesis should be.

(A and B) or (C and D)

or

A and (B or C) and D

There is of course a way to decide which you mean but this is a known confusion in programming languages. The solution in code is typically to put parenthesis. That could be done in UI as

and statement:
-A
and
-B
--or
-C
and
-D

But even that is confusing.

It is possible to map text labels into numbers. Then those numbers can be used in an expression column, and since DG has the logical operators ==, !=, <, ||, &&, ... defined you can create a fairly complicated logical expression. One added benefit is that you can see the mask if you are unsure that you got the logical right.

David
Back to top
View user's profile Send private message Send e-mail
khickey



Joined: 13 Jul 2011
Posts: 22

PostPosted: Tue Feb 12, 2013 7:11 pm    Post subject: Reply with quote

Hey Dave

I guess I had been thinking that it is always interpreted as (A and B) OR (C and D) and that other expressions can be made from this form;
(D and A and B) OR (D and A and C).
However, I can see that it could become very confusing very fast

I tried using the logical expression after mapping my locality text as you suggested and it all works great

Thanks
Cheers
Ken

PS the new Beta also seems to have fixed an issue I had in the general release version of the software, where everytime I tried to use the Loupe the program locked up. In this new Beta that seems to be gone
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started All times are GMT - 3 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group