Daniel Wakefield
03/29/2023, 7:25 PMa, b, c, d, e
. Is there a way to create a histogram where the x axis are the values a, b, c, d, e
and the y axis are how many times each value occurred in the table?Daniel Wakefield
03/29/2023, 8:10 PMMichal Hauzírek
03/29/2023, 8:10 PMSELECT COUNT(ID)
where ID
is a primary key in your table/dataset. (In case of GD Cloud or GD CN m, you can also use SELECT COUNT(dataset)
).
This metric will give you a number of rows.
And then use this metric in your chart together with the column. Note taht the column needs to be mapped to attribute in GoodData (not a fact).
And you will get for each valie of the column number of rows where it appeared.Daniel Wakefield
03/29/2023, 8:11 PMSELECT COUNT (col1, col2)
, and then want to do a histogram of the calculated counts?Michal Hauzírek
03/29/2023, 8:15 PMMichal Hauzírek
03/29/2023, 8:18 PMDaniel Wakefield
03/29/2023, 8:39 PMcol1
) and then count the number of rows in those groups.Daniel Wakefield
03/29/2023, 8:40 PMDaniel Wakefield
03/29/2023, 9:12 PMJakub Sterba
03/29/2023, 9:21 PMselect count({dataset/dataset_id}) by col1
if you want to count number of col1 which have count in given range you can try following:
select count(col1) where (select count({dataset/dataset_id}) by col1) between ... and ...
… are the borders of intervals for the item in histogram. Then add multiple metrics with different ranges into your insight to create histogram.Productboard
03/29/2023, 9:36 PMDaniel Wakefield
03/29/2023, 9:38 PM