Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Users,
I am trying to set the variable from the excel table which is loaded.
The value of the variable is set based on the condition that it should pick the value of 0.75 of the total rows.
For example
Based on the attached excel sheet, value of the variable should be 'i' as it is the 0.75 of total rows from the excel (total rows=20, 0.75 of total row is 15(=20*.75=15),so 15th row of the excel sheet is 'i' from column ID.
Need to the set the variable value in load script not in chart.
Try like:
Tab:
LOAD
ID,
RowNo() as RowNum
FROM
[Variable.xlsx]
(ooxml, embedded labels, table is Sheet1);
Let vNoOfRows=NoOfRows('Tab');
Let v75RowNum=FieldValue('RowNum', vNoOfRows*.75);
Let v75Value=Lookup('ID','RowNum', v75RowNum);
Try like:
Tab:
LOAD
ID,
RowNo() as RowNum
FROM
[Variable.xlsx]
(ooxml, embedded labels, table is Sheet1);
Let vNoOfRows=NoOfRows('Tab');
Let v75RowNum=FieldValue('RowNum', vNoOfRows*.75);
Let v75Value=Lookup('ID','RowNum', v75RowNum);
Hi,
Temp:
LOAD ID,
RowNo() as RowNumber
FROM
[Variable.xlsx]
(ooxml, embedded labels, table is Sheet1)
;
let vNofrows=NoOfRows('Temp')*0.75;
LET Row= peek('ID', $(vNofrows)-1,'Temp');
Thanks,
Pooja
The "peek" function solved my issue. I've been trying to figure out how to dynamically write qvds using a value in a table and add a date to the end.