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: 

Order By disabled in sql dashboard

Laure_Decaudin
New Contributor

Hello,

I have an issue, when I created my query, with an Order By, and my vizualization, everything was in the right order.

Then, when I put it in my dashboard the order changed. As you can see with the pictures, when I clik on "edit visualization", everything seems in order, but in the dashboard, it's not.

Here is the code for the query :

SELECT

 *,

 concat(directory_name, '_', directory_id) as directory,

 energy_kwh_imputed - energy_kwh as diff_projection_kwh, 

 energy_kwh_m2_imputed - energy_kwh_m2 as diff_projection_kwh_m2

FROM

 datalab.benchmark.rich_kpi_scope as scope

 INNER JOIN datalab.benchmark.rich_kpi_consumption as rk_cons USING (directory_id, utilities)

ORDER BY rk_cons.energy_kwh_m2_imputed DESC

Thanks,

Laure

2 REPLIES 2

Megan05
New Contributor III

Try adding row() as an additional variable in your query that you can use as the x-axis. Your code could look something like: row() over( rk_cons.energy_kwh_m2_imputed DESC).

Vidula
Honored Contributor

Hi @Laure Decaudin​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

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