Maddyhome Forums

Discussions related to software developed at maddyhome.com
It is currently Sat May 25, 2013 6:42 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Summary: Group By
PostPosted: Tue May 01, 2012 1:28 pm 
Offline

Joined: Tue Jul 06, 2010 6:16 pm
Posts: 7
I would love to see this kind of Summary:

select <attribute>, count(*)
from <log>
group by <attribute>
order by <attribute>;


For example:
---------------------------------------
Log - Drugs

Attribute Amount Datetime

Tylenol 2 2012-04-01 10:00
Advil 2 2012-04-02 12:15
Motrin 1 2012-04-02 15:30
Advil 2 2012-04-03 09:00
Motrin 1 2012-04-03 17:00

The Summary:

Advil 4
Motrin 2
Tylenol 2


I currently have to import the data into Excel to build a report like this. But I understand it could be too specific.
Better yet, it would be great to let users build their own reports.

Thanks!


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 3:05 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1684
You can get exactly that kind of summary now if your data is setup a specific way. If you use a lookup list, instead of Text, for the attribute's type, then on the summary report it will show a count for each value. This assumes the attribute's Summary property includes 'Count'.

Here's what you can do. This assume the attribute for the drug is currently a Text attribute. Edit the category and tap the drug attribute. Tap on its Type. On the Attribute Type screen tap Edit. Now create a new lookup list. Don't worry about adding any choices yet. Save the new lookup list and return to the Attribute Type screen. Select the new lookup list and save the attribute. Make sure the attribute's Summary property includes Count.

Now go to Tools, Lookup lists. Select the new lookup list. Tap the refresh icon at the bottom. This gives you a chance to populate the lookup list's choices with all the values currently in use by items.

Now view the summary for the items. On the row for the count for the drug attribute you can now tap on it to bring up another screen showing a count for each choice.


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 4:05 pm 
Offline

Joined: Tue Jul 06, 2010 6:16 pm
Posts: 7
thanks for prompt reply! It is great to know the functionality already exists. I guess I am not clear on how to set it up. I do use lookup lists for my logs. Would you be able to work me through the Summary / Filter steps?
Appreciate your help!


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 5:08 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1684
Where are you stuck?

Is the attribute used to track the drug already based on a lookup list? If not then follow the instructions in my last reply to set that up.

Does the Summary property of your drug attribute have 'Count' enabled? If not then turn that on.

That's it. View the list of items and tap the summary icon. Find the drug attribute in the summary. Tap the Count run under it. There you will see the counts for each drug.


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 8:37 pm 
Offline

Joined: Tue Jul 06, 2010 6:16 pm
Posts: 7
sorry, I am afraid I lost here.
Here’s what I do:

1. Select one of my logs - Meds, for example.
2. Hit the little icon with the arrow in the lower right corner
3. Select Summary
now it says “Calculating …” and then it comes up with this

Amount Decimal
#/Total/Avg 1292 / 2,384 / 1.845

4. Now I go to the Filter (icon in the left upper corner)
5. Edit -> +Add Filter
a. type in Filter Name, for example, Test
b. Match All Conditions set to ON
c. Add Condition under Filter Conditions
d. Set Operand to Drug (which is a lookup list of different medicines)
e. Set Operation to “is one of”
i. Select a medicine from the Drug list
ii. Save (the first medicine is now showing up under Argument 1)
iii. Add another Argument …
iv. Repeat few times
f. Now back to the “New Condition” screen. It looks like this:
Operand Drug
Operation is one of
Argument 1 Advil
Argument 2 Tylenol
Argument 3 Motrin
g. Hit Save here.
h. Hit Save on the “New Filter” screen.
i. Done on “Filters” screen
6. Select “Test” on the “Filters” screen and get

Date Range: …
Filter: Test
Meds - 6 entries

Amount Decimal
#/Total/Avg 6 / 12 / 2

I remember seeing “count” somewhere but now I cannot even find it :cry:


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 8:57 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1684
I'm so sorry. My posts have been based on MyStuff2, not iLogger. I've been so focused on MyStuff2 I didn't even realize this was in the iLogger forum.

iLogger doesn't support showing counts for each lookup value.

Sorry for the confusion.

I plan on giving iLogger a massive maker-over toward the end of year. Once that is complete you will have this desired functionality (along with a huge number of other features).


Top
 Profile  
 
 Post subject: Re: Summary: Group By
PostPosted: Tue May 01, 2012 9:58 pm 
Offline

Joined: Tue Jul 06, 2010 6:16 pm
Posts: 7
thanks a lot, I appreciate and looking forward!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group