Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I would like to do a set analysis for a measure based on a dimension filter :
On a line chart I want : per month, 1 line for the data (avg delay payment of current year N) and 1 line for N-1 (same measure)
I wrote this expression in my measure item :
avg({<[PAYMENT DATE] = {"=year([PAYMENT DATE])= max(year([PAYMENT DATE])) "}>} [DATE INV] - [DATE PAYMENT])
This is not working but I don't know how to put a dynamic value without using a variable.
Can I do it without or not ?
Thanks a lot
@chapil try below
avg({<[PAYMENT DATE] = {"=year([PAYMENT DATE])= year(max(total [PAYMENT DATE]))"}>} [DATE INV] - [DATE PAYMENT]) .......for N
avg({<[PAYMENT DATE] = {"=year([PAYMENT DATE])= year(max(total [PAYMENT DATE]))-1"}>} [DATE INV] - [DATE PAYMENT]) .... for N-1
@chapil You can generate master calendar using Payment Date and use the year field from master calendar like below
avg({<Year= {"$(=max(Year))"}>} [DATE INV] - [DATE PAYMENT]) ..... for N
avg({<Year= {"$(=max(Year)-1)"}>} [DATE INV] - [DATE PAYMENT]) ....for N-1
hello, yes it could be like this but I don't have rights to do master items or master calendar so I m trying to do another way
thanks for your answer
@chapil try below
avg({<[PAYMENT DATE] = {"=year([PAYMENT DATE])= year(max(total [PAYMENT DATE]))"}>} [DATE INV] - [DATE PAYMENT]) .......for N
avg({<[PAYMENT DATE] = {"=year([PAYMENT DATE])= year(max(total [PAYMENT DATE]))-1"}>} [DATE INV] - [DATE PAYMENT]) .... for N-1
Thanks a lot,
this is working !