cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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!

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.