cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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