Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I needs to show the ytd,qtd,mtd for the current year in the single kpi as per the selection. I wrote the following in the kpi. But it didn't work. Can anyone share your idea..And i needs to show the prev year also..
$(=if(YTD_QTD_MTD='YTD', Count({<OrderDate={"$(='>=' & Date(YearStart(Max(OrderDate)),'DD-MM-YYYY') &'<=' & date(max(OrderDate),'DD-MM-YYYY') &)"}>}OrderID),
if(YTD_QTD_MTD='MTD', Count({<OrderDate={"$(='>=' & Date(MonthsStart(Max(OrderDate)),'DD-MM-YYYY') &'<=' & date(max(OrderDate),'DD-MM-YYYY') &)"}>}OrderID),
if(YTD_QTD_MTD='MTD', Count({<OrderDate={"$(='>=' & Date(QuarterStart(Max(OrderDate)),'DD-MM-YYYY') &'<=' & date(max(OrderDate),'DD-MM-YYYY') &)"}>}OrderID) ))))
Thanks,
Ajith
So you want the KPI to reflect a selection made in a filter pane for example? You can use
IF(GetFieldSelections(YTD_QTD_MTD)='YTD',...
For the measures you can check these links:
https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Measures/create-cale...
https://www.youtube.com/watch?v=8KH5ebXD4TU