Metrics Delta


I am fetching a certain count data from SQL database. It is employees data for every month / year. Is there anyway how I can make the delta to compare the value to the previous month / year and show a rise or fall depending on that?

Thank You

Hi @akshat

You can certainly do that by computing the difference between current and previous month and assign that to a variable. Subsequently you can call that variable and assign it to the delta parameter of st.metric(). Depending on whether the value is positive or negative, it will be shown as a rise or fall.

Thank you so much!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.