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

AviralBhardwaj

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group