Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field 'SET_STATUS_DATE' I will need help with the syntax for <= date comparison for this field using set analysis.
There are many ways for this scenario, For now few as follows
1) Sum(If(SET_STATUS_DATE=Compare_Field_Name, 1,0))
2) Sum({<SET_STATUS_DATE = {"=SET_STATUS_DATE = Compare_Field_Name"}>} 1)
not completly clear what you are trying to achieve. but in addition to @Anil_Babu_Samineni
if you want to use set analysis to get date ranges for your date field. you can use below syntax (this gives last 2 months Sales
Sum( {<OrderDate={"<=$(=Max(OrderDate)) >=$(=MonthStart(Addmonths(Max(OrderDate),-2)))"}>} LineSalesAmount)
also refer this to learn set analysis
https://community.qlik.com/t5/QlikView-Documents/Set-Analysis-syntaxes-examples/ta-p/1491810
is not giving me the desired results.
Share more details please. Whatever we provided was based on assumptions.
the requirement is if end user select SET_STATUS_DATE field for example "12/16/2015' with the <= syntax the result should be everything less than that date or equal to that date like 2015,2014,2013,2012, etc. Thanks.
this should work
{<SET_STATUS_DATE={"<=$(=Max(SET_STATUS_DATE)) )"}>}
sometimes if the date format is not set correctly you may need to include that around the Max function
Do i put this {<SET_STATUS_DATE={"<=$(=Max(SET_STATUS_DATE)) )"}>} on the data calculation condition expression?
In your Measure expression.