Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
I load a field as a single value in the script and and use it as the value for a variable to use in set analysis. The field only has one value but since I load other tables, sometimes the field value is not selected and the variable has no value. Is there anyway to hard code the value in the field so that it is what it is regardless of selection?
Yes I figured it out. You have to use set analysis in the variable definition like:
=only({1}[Current Fiscal Week])
Yes I figured it out. You have to use set analysis in the variable definition like:
=only({1}[Current Fiscal Week])
I did something like that once, I read a date from a file and save it into variables and then I could use it on the final reports, what I did was:
//source
LastDateFile:
LOAD Date as LastDate
FROM
File.txt
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);
//Variables:
let vDateExt = date(peek('LastDate',0,'LastDateFile'));
let vDay = Day(vDateExt);
let vMonth = Month(vDateExt);
let vYear = Year(vDateExt);
Regards!