Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
JoseGarcia
Creator III
Creator III

Table to only show first row of data

Hi there, 

I would like to add table that shows first row of data only. 

JoseGarcia_0-1588775917092.png

Table should only show first row: Test accident

next row "0" should not exist.

I have done a bit research. I came up with this expression:

= if(getselectedcount([Accidents / Incidents Detail 1])=1,1,0
)

But still no joy! 😞

Can anyone assist? 

Thanks a million!

Jose

 

1 Solution

Accepted Solutions
klikgevoel
Contributor III
Contributor III

Syntax should be:

If([Accidents / Incidents Detail 1] <> '0',[Accidents / Incidents Detail 1] ,null())
And uncheck Display Null values in your table.

Second, more robust would be to filter out the '0' in script editor.

TableName:

Load

[Accidents / Incidents Detail 1]

From Data

Where Not Match([Accidents / Incidents Detail 1] ,'0');

View solution in original post

4 Replies
IamAlbinAntony
Creator
Creator

try null() instead of 0 in else condition and then tick hide null value in dimension.

or in back end script, you can use 'order by' then use First 1 LOAD * to load first line of row based on your desired order.

JoseGarcia
Creator III
Creator III
Author

Hi there, replace the 0 with Null () but shoing error in syntax 😞

where am I going wrong here?

JoseGarcia_0-1588843900536.png

 

klikgevoel
Contributor III
Contributor III

Syntax should be:

If([Accidents / Incidents Detail 1] <> '0',[Accidents / Incidents Detail 1] ,null())
And uncheck Display Null values in your table.

Second, more robust would be to filter out the '0' in script editor.

TableName:

Load

[Accidents / Incidents Detail 1]

From Data

Where Not Match([Accidents / Incidents Detail 1] ,'0');

JoseGarcia
Creator III
Creator III
Author

Hi all, 

Many thanks for your help on this!

latest post worked! 

Thanks a million! 

It was driving me insane!

Thanks again for your support! 

🙂

Jose