display another value associated with the max value

Stimulsoft Dashboards.JS discussion
Post Reply
palmer83
Posts: 16
Joined: Thu Apr 20, 2023 7:33 pm

display another value associated with the max value

Post by palmer83 »

Hello,

In a dashboard, I'm wanting a text box to display something associated with the max or top value.

For example if my data was this:
GENDER, JOB_TITLE, EMPLOYEE_COUNT
Male, doctor, 10
Female, doctor, 20
Male, lawyer, 30
Female, lawyer, 40

How could I get it to display "Female - lawyer" given that in this example the max employee_count is 40?

I'm able to do this easily in a chart by setting the value to employee_count and the arguments to gender, job title and then use top N, but I can't use that option since I don't want to display a graph with this, I only want to display the text.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: display another value associated with the max value

Post by Lech Kulikowski »

Hello,

You can use the DataTransformation item to calculate all necessary values and then use it in text components.

Thank you.
Post Reply