Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple breakouts of the same date/time column with different granularities #4726

Open
christopheg opened this Issue Apr 7, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@christopheg
Copy link

christopheg commented Apr 7, 2017

Hi,

I don't know how to classify this request. Maybe what I'm looking for is already possible and I just need someone helping me out here. If not, it could be a feature request.

The 'problem' is the following: Image a table (ex 'invoice') which has the following fields:
'id', 'created', 'price'
I would like to produce a line chart with X = 'months of year' and Y = 'total value'.
To make the values comparable per year, I would like to have a line per year.
Each line would than plot the total amount invoiced for a month in the given year.
I've found a comparable chart which shows what I'm looking for:
https://harpoonapp.com/static/uploads/docs-dashboard-revenue-per-month.png

Would this be possible?

@tlrobinson

This comment has been minimized.

Copy link
Member

tlrobinson commented Apr 7, 2017

This is almost possible, except that we only allow you to break out by each column once, even if you were to pick a different date granularity. You'd do basically "sum of price, grouped by created: month-of-year, created: year".

I'm kind of faking it here by using a different date column for the two breakouts:

screenshot 2017-04-07 12 55 12

@tlrobinson tlrobinson changed the title multiple series by year Allow multiple breakouts of the same date/time column with different granularities Apr 7, 2017

@tlrobinson

This comment has been minimized.

Copy link
Member

tlrobinson commented Apr 7, 2017

I'd propose removing the uniqueness requirement for date/time breakouts. @metabase/core-developers ?

@christopheg

This comment has been minimized.

Copy link
Author

christopheg commented Apr 7, 2017

I love to see this feature!

@atharvai

This comment has been minimized.

Copy link

atharvai commented Jul 14, 2017

is this going to be fixed in the next version (0.25 or 0.24.3)? This was working in 0.23.x but not in 0.24.x

@attekei attekei assigned attekei and unassigned attekei Jul 14, 2017

@attekei attekei added this to the 0.26 milestone Jul 24, 2017

@salsakran salsakran modified the milestones: 0.26, 0.27 Sep 12, 2017

@camsaul camsaul modified the milestones: 0.27, 0.28 Nov 28, 2017

@salsakran

This comment has been minimized.

Copy link
Contributor

salsakran commented Dec 18, 2017

@camsaul is this also a limitation in MBQL or just a frontend issue?

@camsaul

This comment has been minimized.

Copy link
Member

camsaul commented Dec 18, 2017

This is almost possible, except that we only allow you to break out by each column once

@salsakran I'm fairly certain this is only a QB/frontend constraint and if we tweak that code the query should work again, e.g.

This was working in 0.23.x but not in 0.24.x

@salsakran

This comment has been minimized.

Copy link
Contributor

salsakran commented Feb 5, 2018

@camsaul
From the WIP PR linked above --
"If you group by the same date field multiple times with different granularities, the backend response lacks id, table_id, unit and some other properties for the column of second breakout. Frontend is unable to display the column correctly because of that. The dataset query body for reproducing this:"

@salsakran salsakran modified the milestones: 0.28, 0.28.1, 0.28.2 Feb 7, 2018

@salsakran salsakran modified the milestones: 0.28.2, 0.29 Mar 20, 2018

@salsakran salsakran removed this from the 0.29 milestone Apr 25, 2018

@salsakran salsakran added this to the 0.30 milestone Apr 25, 2018

@salsakran salsakran modified the milestones: 0.30, 0.31 Sep 14, 2018

@camsaul camsaul modified the milestones: 0.31, 1.0 Nov 21, 2018

@camsaul

This comment has been minimized.

Copy link
Member

camsaul commented Nov 30, 2018

@christopheg are you still seeing this in Metabase 0.31.1? This might have been fixed already

@camsaul camsaul modified the milestones: 1.0, 0.31.3 (?) Nov 30, 2018

@camsaul camsaul modified the milestones: 0.31.3 (?), 0.32.0 Dec 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.