Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have created Mtd using this formula
Sum({<MonthNumber={"<=$(=(max(MonthNumber)))"},Month=>} Value)
its working fine when i select march its also sum jan,feb and march when i do not select any month its showing 12 month sales in kpi but i want its show current month sales value in kpi without any selection
Qlik Sense Business Qlik Sense Desktop Qlik Sense Mobile Qlik Sense Enterprise on Windows
Add 1 to expression
Sum({1<MonthNumber={"<=$(=(max(MonthNumber)))"},Month=>} Value)
Or this
Sum({<MonthNumber={"$(=max(MonthNumber))"}, Month=>} Value)
both are not showing sum of till current month
MTD would be Current Month only, but your use case of selecting March and showing Totals of Jan,Feb & Mar is actuall YTD !
I would stick to using the Date field , for both MTD and YTD
MTD : latest month by default or Selected month
Sum({<Datefield = {">=$(=Date(MonthStart(Max(Datefield ))))<=$(=Date(Max(Datefield )))"} >} Value)
YTD: Year to Date by default or Year to Date until selected Date/Month
Sum({<Datefield = {">=$(=Date(YearStart(Max(Datefield ))))<=$(=Date(Max(Datefield )))"} >} Value)
replace Datefield with your actual date field name