Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i want to pass the field into a variable
below is my code
let vVar= If(MonthStart(OrderDate)= MonthStart(Today(1)),1,0); /// this one
sample:
LOAD
Product,
"Year",
"Month",
"OrderDate",
Sales
FROM [lib://Data/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
same i passed to variable but its not working any other way to achieve this?
i want to compare if data is available for current month display 1 orelse 0
thanks
Chanty
SET vVar= If(MonthStart(OrderDate)= MonthStart(Today(1)),1,0); /// this one
sample:
LOAD
Product,
"Year",
"Month",
"OrderDate",
$(vVar) as CurrentMonth,
Sales
FROM [lib://Data/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
SET vVar= If(MonthStart(OrderDate)= MonthStart(Today(1)),1,0); /// this one
sample:
LOAD
Product,
"Year",
"Month",
"OrderDate",
$(vVar) as CurrentMonth,
Sales
FROM [lib://Data/sample.xlsx]
(ooxml, embedded labels, table is Sheet1);
thanks clever
the script which i am using giving me correct but the variable is not working
but the variable result am getting null as a field it is giving me correct.
but i want the variable to use in Nprinting
Seems working with SET rather LET
would you mind testing my solution and giving feedback?
Seems working in field too
LET vVar= If(MonthStart(OrderDate)= MonthStart(Today(1)),1,0);
LOAD *,If(MonthStart(OrderDate)= MonthStart(Today(1)),1,0) as CurrentMonth Inline [
Product, Year, Month, OrderDate, Sales
A, 2017, 1, 12/1/2017, 10
B, 2016, 5, 12/10/2016, 20
C, 2015, 10, 10/10/2015, 30
];
LOAD * Inline [
FieldName
'$(vVar)'
];
your way it works but that i dont need clever
yes anil its working but same variable am giving as a condition in npritning it is not working
I don't even what is N-Printing. May be i am going to kick that.. Not sure how to call in N-Printing.
there will be one option like condition there we can pass qlik variable
so now am passing above variable like when my report having latest month data the report should send to customer or else it should not send
this is my requirement. now the variable is working but when i test in nprinting the report is not generating even though current month data is there .