Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Variable issue

I am using the below variable in my measure and it works perfectly correct.

let vLastmonthdate2 =floor(num(Date(floor(monthend(addmonths(Today(),-1))))));

My measure is Sum({<DateBridgeFlag={'Inventory'},Company_Code={215,240},[Inventory Type]={'RM\BOP','RM\BOP-Arya'},[Table Source_Inventory]={'WHUIL200'},[Invoice_Date_GMT_Updated]={"$(vLastmonthdate2)"}>} Weight_Inventory)

 

But when I just put the value in place of variable, it is giving me wrong values

Sum({<DateBridgeFlag={'Inventory'},Company_Code={215,240},[Inventory Type]={'RM\BOP','RM\BOP-Arya'},[Table Source_Inventory]={'WHUIL200'},[Invoice_Date_GMT_Updated]={'=$(=(floor(num(Date(floor(monthend(addmonths(Today(),-1))))))))'}>}Weight_Inventory)

 

Can anyone please help me?

1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

Try it with:

let vLastmonthdate2 =floor(monthend(addmonths(Today(),-1)));

Sum({<DateBridgeFlag={'Inventory'},Company_Code={215,240},[Inventory Type]={'RM\BOP','RM\BOP-Arya'},[Table Source_Inventory]={'WHUIL200'},[Invoice_Date_GMT_Updated]={"$(=floor(monthend(addmonths(Today(),-1))))"}>}Weight_Inventory)

- Marcus

View solution in original post

1 Reply
marcus_sommer
MVP
MVP

Try it with:

let vLastmonthdate2 =floor(monthend(addmonths(Today(),-1)));

Sum({<DateBridgeFlag={'Inventory'},Company_Code={215,240},[Inventory Type]={'RM\BOP','RM\BOP-Arya'},[Table Source_Inventory]={'WHUIL200'},[Invoice_Date_GMT_Updated]={"$(=floor(monthend(addmonths(Today(),-1))))"}>}Weight_Inventory)

- Marcus