Table failing to load properly on page reload

Initially, the table is like this

After reloading the page, the table is shown like this

Post "Diagnostic Info" from Admin > Troubleshooting.
If you're not using the latest release, then try upgrading first: https://github.com/metabase/metabase/releases/latest

I'm working on the latest version v0.41.0 @flamber

@Anum Latest version is 0.41.1: https://github.com/metabase/metabase/releases/latest

How about you simply just post "Diagnostic Info" from Admin > Troubleshooting every single time you create a new topic, so I don't have to constantly ask for it?

But you are posting screenshots from two different places. First is a question, second is a card on a dashboard.
Try resetting visualization settings on the dashboard of the card by hovering > Visualization options > Reset to defaults.

Restting the visualization setting did not help.
Can we run a prepare statement on metabase. I have a written a query that pivots the table following this tutorial https://stackoverflow.com/questions/12004603/mysql-pivot-row-into-dynamic-number-of-columns.

If you are having major trouble with this, you can use the pivot table feature that Metabase provides. It works seemingly well for me.

Screenshot_20211023_195137

@Anum You are not providing enough information to reproduce the problem. Metabase supports advanced Pivot Tables since 0.38: https://www.metabase.com/docs/latest/users-guide/05-visualizing-results.html#pivot-table

The pivot option is working well in the question. but when i embedd this card in the dashboard, it fails to load properly

@Anum You're more than welcome to open an issue with enough details for other people to reproduce:
https://github.com/metabase/metabase/issues/new/choose