Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi group,
I am facing a challenge task with my dashboard.
I have a KPI showing the total user there are in the selected months
Now I would like to have second KPI showing the SUM of the previous months to those selected. (just previous from the first selected in order by months)
I appreciate any help.
Thank you
you can achieve it using set analysis
Sum({<date={"=$(=date(max(date)-1))"}>}Sales)
you can customized as per your need. also to get more accurate answer, please provide some sample data & required output.
Regards,
Prashant Sangle
This is the data, and we supposed we selected DECEMBER, NOVEMBER AND OCTOBER (SUM = 1000)
second KPI should take AUTOMATICALLY months JULY, AUGUST AND SEPTEMBER (SUM=450)
Thanks @PrashantSangle
find below snip.
My Script
Test:
Load Date,
Date(Date#('01/'&Date&'/2023','DD/MMM/YYYY')) as new_date,
Users Inline [
Date, Users
Jul, 200
Aug, 100
Sep, 150
Oct, 400
Nov, 500
Dec, 100
];
Exit Script;
KPI - For selected Months - Sum(Users)
KPI - For Previous Months - Sum({<Date=,new_date={"<$(=min(new_date))"}>} Users)
Hope this will help you.
Regards,
Prashant Sangle
Sum({<Date={">=$(=Date(MonthStart(AddMonths(MonthStart(min(Date)), -3))))<=$(=min(Date))"}, Users)
This is showing up a value, but it is not what I want
Thanks
I am not able to get the data in my case.
I am getting the data from Google Analytics and this has different structure...
Sum({<new_date={">=$(=AddMonths(Max(new_date), -3))<=$(=AddMonths(Max(new_date)))"}, metric_type={'totalUsers'}, dimension={"no Dimension"}>} value)
but it showing up data, that is not useful for me.
I want to show the data from last 3 month till teh minum selected.
I appreciate any help. Thank you
RangeSum(Above(Sum({<metric_type={'totalUsers'}, dimension={"no Dimension"}, new_date -= {'*'}>} value), 0, RowNo(Total)))
Incluso probando esta, me da valores que estan seleccionados,eso no lo quiero.
use this
First KPI :- sum(Users)
Second KPI :- sum{1-$}Users)
This works, but not as in my case.
I have to filter this columns : metric_type, dimension by these values and then I can get the values I want.
sum ( {1-$} {<metric_type={'totalUsers'}, dimension={"no Dimension"} value)
by the way, this is Google Analytics
Thank you