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

BigValue downIsGood not working properly #1973

Closed
adgramigna opened this issue May 5, 2024 · 0 comments · Fixed by #1992
Closed

BigValue downIsGood not working properly #1973

adgramigna opened this issue May 5, 2024 · 0 comments · Fixed by #1992
Labels
bug Something isn't working to-review Evidence team to review

Comments

@adgramigna
Copy link

adgramigna commented May 5, 2024

Steps To Reproduce

Code snippet with needful things data. I'm aware logically this would be an example for downIsGood should be the default value of false, but for illustrative purposes, let's pretend we want less purchases on "Sinister Toys" and therefore downIsGood should be set to true.

View issue as raw text as markdown formatting is hiding some of the needed code for Evidence. I've attached a screenshot of the code just in case
Screenshot 2024-05-05 at 3 45 23 PM

  select 
      date_trunc('month', order_datetime) as month,
      sum(sales) as sales_usd,
      category
  from needful_things.orders
  where category = 'Sinister Toys'
  and (date_trunc('month', order_datetime) >= '2021-11-01')
  group by all
  order by 1 desc
with create_monthly_change as (
    select 
    category,
    lag(sales_usd) over() - sales_usd as monthly_change,
    case when month = '2021-11-01' then sales_usd end as nov_sales,
    case when month = '2021-12-01' then sales_usd end as dec_sales,
from ${orders_by_category}
)

select
    category,
    max(monthly_change) as monthly_change,
    max(nov_sales) as nov_sales,
    max(dec_sales) as dec_sales,
from create_monthly_change
group by 1

Environment

  • Node version (node -v): v20.9.0
  • npm version (npm -v): 10.5.2
  • OS: Mac
  • Browser: Arc
  • Database: Duckdb

Expected Behavior

the downIsGood parameter is supposed to flip the colors for Red and Green in the comparison

Actual Behaviour

Parameter does not work. downIsGood=true has the same effect as downIsGood=false, positive numbers are green and negative numbers are red

Workarounds

None that I know of

@adgramigna adgramigna added bug Something isn't working to-review Evidence team to review labels May 5, 2024
@hughess hughess mentioned this issue May 9, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to-review Evidence team to review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant