Label data not display when have one param is blank

This card result can not display data label when have one param is null

But it appear again when all data label was fulfilled

I am using metabase version v0.35.3

One more question: When metabase will have option to show all data label ?

Thanks alot

2 Likes

Hi @vietbeo603
Without seeing the query, it's difficult to know. Can you reproduce with Sample Dataset?
Metabase already has the option to show all data labels in visualization Settings > Display > Values to show: All

Not all values, I mean all data, all y axis, like you have two diferrent data line to show, you can just display once per query.

I found a way to make the label appear again by fixing the code to remove the param, I don’t know how to reproduce this case test, its seems like an accident

@vietbeo603 Ohh, that’s multiple series, which is currently not supported. There’s a request for that:
https://github.com/metabase/metabase/issues/11585 - upvote by clicking :+1: on the first post

Can you please check this query, I can not make it display label data anymore, not like last time, I just need to fill in param
https://bi.ahamove.com/question/17726?timeview=quarter&end_date=2020-03-31&city=HAN

my query is:

select date_trunc({{timeview}}, to_timestamp(first_complete_time)) as first_complete_time
        , count(distinct s.id) as total_dfd 
from supplier s 
left join custom.ops_fb f on s.id = f.id
where s.city_id in ('HAN','SGN') 
and first_complete_time between
                                case when {{timeview}} = 'week' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '1 week'))
                                     when {{timeview}} = 'day' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '1 day'))
                                     when {{timeview}} = 'month' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '1 month'))
                                     when {{timeview}} = 'quarter' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '3 month'))
                                     when {{timeview}} = 'year' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '1 year'))
                                     else extract(epoch from current_date::timestamptz) end
                                and 
                                extract(epoch from date_trunc({{timeview}}, {{end_date}}::timestamptz))
[[and city_id = {{city}}]]
and coalesce(tags::text,'') not similar to '%(GHN|PARTNER|TCH)%'
and referral_id is not null
group by 1

union all 

select date_trunc({{timeview}}, to_timestamp(first_complete_time)) as first_complete_time
        , count(distinct s.id) as total_dfd 
from supplier s 
left join custom.ops_fb f on s.id = f.id
where s.city_id in ('HAN','SGN')
and first_complete_time between
                
                case when {{timeview}} = 'week' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '10 week'))
                     when {{timeview}} = 'day' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '30 day'))
                     when {{timeview}} = 'month' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '7 month'))
                
                     else extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) - interval '15 month')) end
                and 
                case when {{timeview}} = 'week' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) + interval '1 week'))
                     when {{timeview}} = 'day' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) + interval '1 day'))
                     when {{timeview}} = 'month' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) + interval '1 month'))
                     when {{timeview}} = 'quarter' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) + interval '3 month'))
                     when {{timeview}} = 'year' then extract(epoch from (date_trunc({{timeview}}, {{end_date}}::timestamptz) + interval '1 year'))
                     else extract(epoch from current_date::timestamptz) end
[[and city_id = {{city}}]]
and coalesce(tags::text,'') not similar to '%(GHN|PARTNER|TCH)%'
and referral_id is not null

group by 1
)

select * from sample 
order by 1```

It will be happended when I try to put this report to a dashboard.
At first time trying, the data label still appear

@vietbeo603
If this is a different problem, then please open a new topic about it.
I don’t have access to your data. Can you reproduce with Sample Dataset?

I can not reproduce it because its seems randomly happen :expressionless:

@vietbeo603 Then check the browser developer console for any errors, and you can also check the Network-tab to see differences in request data (if there are any).
Otherwise a screencast video of the problem would help a lot in understanding the problem.