cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create grouped bars that are also stacked visualization?

Michal_L
New Contributor

I wish to create a visualization combined of grouped bars, and also have those bars stacked.

Attached is a sketch of the final result I am interested in.

I am also attaching my sql because I'm not sure if I should "group by" in the query or in the visualization parameters.

image

select SUM(case when partition_date= '2022-11-16' then 1 else 0 end) as uploads_2022_11_16,
SUM(case when partition_date= '2022-11-17' then 1 else 0 end) as uploads_2022_11_17,
SUM(case when partition_date= '2022-11-18' then 1 else 0 end) as uploads_2022_11_18,
sourceType, entryApplication
from ovp_raw.entry_lifecycle
where partition_date > '2022-11-15'
group by sourceType, entryApplication

now it is just all stacked

Screenshot_20221208_040021

1 REPLY 1

Aviral-Bhardwaj
Esteemed Contributor III

try to use asc or dsc keyword ,maybe it worked

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.