Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Please help me with the logic for YTD..
My expression is :
sum(If(Val_Date >= Cal_MonthYear and Val_Date < AddMonths(Cal_MonthYear, 1), [Net Tractor Revenue (Domestic)]))
/
sum(If(Link_Date >= Cal_MonthYear and Link_Date < AddMonths(Cal_MonthYear, 1), [Net Tractor Revenue (Domestic)])))
I want to show YTD with the above expression..
For e.g If i select Sep Month then it should show from Apr to Sep..
Regards,
Kavita
Try
sum({<Val_Date = {">=$(=date(yearstart(max(Val_Date),0,4)))<=$(=date(max(Val_Date)))"},Cal_MonthYear=>} [Net Tractor Revenue (Domestic)])
How about this?
Sum({<Val_Date = {"=Only({<Cal_MonthYear>} Val_Date) >= Only({<Cal_MonthYear>} Cal_MonthYear) and Only({<Cal_MonthYear>} Val_Date) < AddMonths(Only({<Cal_MonthYear>} Cal_MonthYear), 1)"}>} [Net Tractor Revenue (Domestic)])
/
Sum({<Link_Date = {"=Only({<Cal_MonthYear>} Link_Date) >= Only({<Cal_MonthYear>} Cal_MonthYear) and Only({<Cal_MonthYear>} Link_Date) < AddMonths(Only({<Cal_MonthYear>} Cal_MonthYear), 1)"}>} [Net Tractor Revenue (Domestic)])
Its not working...
I want to show this in line chart Monthly trend...where on selection of any month..
It should show from Apr to selection Month..
Dimension Is Month and Expression as mentioned before.
Can you check both the expressions individually to see if one of them works? If one works, we can just focus on the other
Please post a small Qlik Sense app with example data that demonstrates the problem.
Yes..I checked..its not working..
Cal_MonthYear is Calendar Field..
and ValDate, Link Date are the tables field..
I am not linking the Calendar with these dates..and my Year & Month filters are Calendar fields filters...
So I want to show YTD on the basis of Calendar(Year & Month filters).
I think it would be easier to understand what you are trying to do, if you can share a small sample
PFA
Which sheet are we looking into?