Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I am trying to calculate the numeric value of a specific field (in this case TEU) for the previous period. I am using the following expression:
=({<[DATE] = {">=$(=Date(min_date - date_diff-1))""<=$(=Date(min_date - 1))"}>} [TEU])
However my output is considering the full number of TEU's except the selected month, and what I wish is to only see the values for the previous period. Basically qlik is able to recognize the 2nd part of my expression "<=$(=Date(min_date - 1))" which defines the last day of the previous period but not the 1st part ">=$(=Date(min_date - date_diff-1))". This is where I define the first day of the previous period using date_diff (this checks the range of days of my selected period).
Suggestions?
Could be a syntax mistake? Try this way:
=({<[DATE] = {">=$(=Date(min_date - date_diff-1))<=$(=Date(min_date - 1))"}>} [TEU])
Try this
=({<[DATE] = {">=$(=Date(min_date - date_diff - 1))<=$(=Date(min_date - 1))"}>} [TEU])
if it works for you, let me know and set my answer as "resolved" please.