Skip to main content

Announcements
Week 3: High-Volume Iceberg Ingestion and Smarter Data Prep - WATCH NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get the number of rows in a straight table dynamically and use it in an expression.

QkviewIdiot1.PNG.png

Hi, I have a requirement. There are three places I am using a field named 'Employee_Name'

1) Is He Available straight box.(Table1)

2) Hours Allocated (Table2)

3) Hours Available.(Table3)

For easiness I shall refer them as Table1,2...

Req1: Now only after I click on Employee_Name field in 'Is He Available' table, 'Hours Allocated should appear'.

Req2: Also note that, 'Hours Available' table shall appear always.

For that in the 'Layout' show condition of Table 1, I have written GetSelectionCount(Employee_Name) >0. Then when I select any Employee_Name in Table1, then only it is displaying Table2. However, when there are no rows in Table1, then it shouldn't display table2. But it is still displaying because, Employee_Name is selected in Table3.

This mustn't occur. I want something like only if I select Employee_Name in Table1, then only display Table2. How to achieve this. Also can you say me How to get the number of rows in a straight table dynamically and use it in an expression..

Thanks in Advance

3 Replies
Gysbert_Wassenaar
Partner - Champion III

To get the number of rows you can use sum(aggr(1,Dim1, Dim2, ... , DimN))


talk is cheap, supply exceeds demand
swuehl
MVP

Have a look at the discussion here:

Number of rows in straight/pivot table into a variable?

anlonghi2
Creator II

Duplicate the field "Employee_Name" naming it, for example, "My_Employee_Name" and then use this new field as dimension in table 3.