cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

First occurrence of a field

pcho
7 - Data Storage
7 - Data Storage

Hello. I work with healthcare dashboards. For the data elements that have one-to-many relationships, is there a script for a widget, so that the table within the widget only selects the first field of that data element?

For example, there's a data element called "secondary provider impression" that can have "cardiac arrest", "chest pain", or "cough", etc. But I only want the table/dashboard to show the first value that is not null.

Thank you!

4 REPLIES 4

DRay
Community Team Member
Community Team Member

Hello @pcho,

Can you take a look at these and let us know if it applies to your use-case?

You can create a custom table in the Data Model: https://docs.sisense.com/main/SisenseLinux/adding-a-custom-table.htm

Here are some ideas for what the SQL could look like: https://www.sisense.com/blog/4-ways-to-join-only-the-first-row-in-sql/

I hope that helps! Please keep us posted.

 

David Raynor (DRay)

pcho
7 - Data Storage
7 - Data Storage

Unfortunately as database users, we don't have access to Data Models or modifying SQL. We can only edit scripts for each widget or overall dashboard.

DRay
Community Team Member
Community Team Member

I'll see what I can find out, but if this is something that will need to be used frequently, especially across multiple Widgets or Dashboards, it would be better to have it on the Data level. Keeping track of and updating individual Widget and Dashboard scripts is not going to scale well. ๐Ÿ™‚

 

David Raynor (DRay)

pcho
7 - Data Storage
7 - Data Storage

Ahh I see. Thank you so much!