Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This is my Data and I want
Max Month Count of Days
my max month is december
I want that when I select OCT and NOV then it should give me both month count together is 61 in KPI
SampleSuperstore:
LOAD
"Order Date",
Month("Order Date") as Month,
Year("Order Date") as Year,
Day("Order Date") as Day,
MonthName("Order Date") as MonthName
FROM [lib://Data Source/Sample - Superstore Main.xlsx]
(ooxml, embedded labels, table is Orders);
I have used this expression =Max(day([Order Date]))
but not working its giving me Total no of max days
Please help me to get max month count of Days
Try this:
COUNT(DISTINCT {<Month={"=$(=MAX({1}Month))"}>} ORDER_DATE)
Hi @simsa
I tried but not working as I said I want that for example in filter pane If i select November which has 30 and Oct which has 31 together then in kpi it will show 61 which means 31 + 30 is 61 Count
Try this:
Sum(Aggr(Count(DISTINCT Day), Year, Month))
In script mention months days like
floor(MonthEnd(date))-floor(Monthstart(date))+1 as days
in KPI use sum(days).
I am unsure regarding the requirement, is it- by default you just want the count of days for DEC (31)
And in case you select months say Oct+Nov in your case, you want 61 as output?