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

Advanced Analytics time comparison is feature is not working #21610

Closed
2 tasks done
stephanclaus opened this issue Sep 27, 2022 · 6 comments
Closed
2 tasks done

Advanced Analytics time comparison is feature is not working #21610

stephanclaus opened this issue Sep 27, 2022 · 6 comments
Assignees
Labels
#bug Bug report data:connect:snowflake Related to Snowflake explore:advanced-analysis Related to Advanced Analysis in Explore preset:cares Preset cares about this issue

Comments

@stephanclaus
Copy link

stephanclaus commented Sep 27, 2022

A clear and concise description of what the bug is.

How to reproduce the bug

  1. Create a new chart with Line or Smooth Line
  2. Add a date column into the time column and select the same column for the x axis
  3. Use the Advanced Analytics Section to create a lagging Metric with Time Shift (e.g. 1 year) and selection Actual Values
  4. Click Update Chart
  5. see error: Unexpected error Error: A time column must be specified when using a Time Comparison.

Expected results

The chart will be rendered as expected with a YoY comparison

Actual results

An error is thrown: Unexpected error Error: A time column must be specified when using a Time Comparison.

Screenshots

config_1

config_2

error

Environment

(please complete the following information):

  • browser type and version: chrome Version 105.0.5195.102
  • superset version: 2.0.0

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

Used to work before in superset 1.5.1. When I remove the configuration in the Advanced Analytics Section, the chart will render just fine. I assume Superset is too restrictive when a date column is added but the Advanced Analytics really expect a time column.

@stephanclaus stephanclaus added the #bug Bug report label Sep 27, 2022
@zhaoyongjie
Copy link
Member

zhaoyongjie commented Sep 28, 2022

Hi @stephanclaus, what database do you use? I have fixed an issue at PR recently for the SQLite.

@stephanclaus
Copy link
Author

Hi @zhaoyongjie, we are using Snowflake.

@zhaoyongjie
Copy link
Member

@stephanclaus Could you reproduce this issue on the other database as well?

@stephanclaus
Copy link
Author

stephanclaus commented Sep 28, 2022

@zhaoyongjie I just tried it again with a PostGres database and there the feature works as expected.

@zhaoyongjie zhaoyongjie added data:connect:snowflake Related to Snowflake explore:advanced-analysis Related to Advanced Analysis in Explore labels Oct 5, 2022
@rusackas rusackas assigned yousoph and unassigned zhaoyongjie Dec 22, 2022
@rusackas rusackas added the preset:cares Preset cares about this issue label Dec 22, 2022
@mattitoo
Copy link
Contributor

mattitoo commented Mar 2, 2023

Can confirm this is not working on Snowflake

@zhaoyongjie
Copy link
Member

zhaoyongjie commented Mar 20, 2023

@stephanclaus I can't reproduce this issue on the latest master and 2.1.0RC2. I believe this PR has fixed the issue.

cc: @mattitoo

@yousoph yousoph closed this as completed Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report data:connect:snowflake Related to Snowflake explore:advanced-analysis Related to Advanced Analysis in Explore preset:cares Preset cares about this issue
Projects
None yet
Development

No branches or pull requests

5 participants