Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, may be somebody can help me
Now I have the date, which I divided on Year, Month, date.
The part of my script is here:
DATE ( "Дата поступления претензии") AS Date,
Month ( "Дата поступления претензии") AS Month,
Year ( "Дата поступления претензии") AS Year,
Currently I have Months as the names (Jan, Feb, Mar....).
The aim - I want to calculate metrics versus last month
for ex: to clik in filters: 2018 Jun and have metric for automatic calculation vs previous month (in this case it is 2018 May)
But I can't do it.
How I can add the new column with month as numbers (1, 2, 3, 4...12) and apply Max\Min (Month) function ?
Or may be you know another decision?
my formula: Count([Numbers of complaints])/Sum({<[Source of claim]=>}ktn)
P.S: for calculation vs full last year work this:
(Count({$<Year={"$(=Max(Year))"}>}[Numbers of complaints])/Sum({$<Year={"$(=Max(Year))"},[Source of claim]=>}ktn))-
(Count({$<Year={"$(=Max(Year)-1)"},Month=>}[Numbers of complaints])/Sum({$<Year={"$(=Max(Year)-1)"},[Source of claim]=, Month=>}ktn))
To trasfer month names to month numbers, you need
Num(Month ( "Дата поступления претензии")) AS MonthNum
Then, call
Max(MonthNum) as maxmonth,
Min(MonthNum) as minmonth
Thanks a lot!!!!!