Google Spreadsheet Post #2014
Using multiple "count() where" arguments in a Google Query
Team,
Yogi Anand, D.Eng, P.E. ANAND Enterprises LLC -- Rochester Hills MI www.energyefficientbuild.com. Jan-10-2016
post by: MSG Crane:
https://productforums.google.com/forum/?utm_medium=email&utm_source=ba_notification#!topic/docs/umbbrIQPzVU;context-place=forum/docsUsing multiple "count() where" arguments in a Google Query
Team,
Hoping for a little help... I am building a charts dashboard and one of the charts is a line chart depiction of the total number of records that meet the following criteria in column "K": "Start Usage", "Midpoint", and "End Usage".
In the end, I would like the query result to show the following so I can graph each submission type with different lines on the chart:
| A | B | C | D |
------------------------------ ------------------------------ ------------------------------ -------
|Date | Count of Start Usage | Count of Midpoint | Count of End Usage |
I feel like the way to do this is three iterations of count() where K = "???" on column D. I can get it to work with one iteration of "count() where" but I cannot figure out how to get it to work three times in the same query...
This works:
select A, count(D) where K = 'Start Usage' group by A
Query as it stands right now with coloring for clarity (need help):
select A, count(D) where K = 'Start Usage' label 'Count of Start Usage', count(D) where K = 'Midpoint' label 'Count of Midpoint', count(D) where K = 'End Usage' label 'Count of End Usage' group by A
-------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment