Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a variable named daysOfComparison declared as follows:-
=date(lastDate)-compday
where compday is the value entered by user for comparing no. of days.
Lets say if user enters 5 as comparison no. of days input box then the sales for 10/5/2018 will be displayed in chart as per formula mentioned above in variable
Note last date is 10/10/2018
Following is the image for above explanation
Now I want to write an expression for the same ie when user selects comparison(no. of days )=5 then sales for 10/5/2018 should be displayed
How to write an expression?
If you want to show only one date of value, Try this?
Sum({<lastDate = {$(=VariableName)}>} Measure) // VariableName means - Your Input box variable
Or
Sum({<lastDate = {"=$(=Date(date(lastDate) - $(compday)))"}>} Measure)
Hi
sum({<lastDate = {$(=DaysOfComp)}>} [inv value])
This expression is giving no result
Sum({<lastDate = {"=$(=Date(date(lastDate) - $(compday)))"}>} [inv value])
This expression is giving result but when I am entering value as comparison no. of days as 5 the corresponding date in text is being changed as 10/5/2018
but the result is not reflected in charts
Following is the image
Please help @Sunny Talwar
Are you sure that you have created variable for comparison purpose?
Sum({<lastDate = {"=$(=Date(date(lastDate) - $(compday)))"}>} [inv value])
compday - Can you please check if The variable is same. And Can you show the same variable in Text object after entering some value whether it is changing or not?
Hi
I have varaiable name DateOfComp labelled as
LastDate - No. Of Days
in which I have entered the value as follows :-
and comp is again a variable which has user defined value and it is used in the formula used for DateOfComp
and when expression is taken as an text box object the value is not changing for the following expression
Sum({<lastDate = {"=$(=Date(date(lastDate) - $(compday)))"}>} [inv value])
but when I enter compday=8 the corresponding value gets changed for the DateOfComp labelled as LastDate - No. Of Days
Can you test alone in text object using below and tell me what is returning?
=Date(date(lastDate) - $(compday))
Following I am getting in text box
Why this particular expression is giving an error?
=Sum({<sold_Date(=$(DaysOfComp))}>} [inv value])
Can you change compday and show the same?