Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon everyone, how are you?
I need some help to understand why one of my mesaures are not working as expected.
I have two measures, the first is used to get the month value
--- sum(aggr(sum(distinct{$<Mes={"$(=month(max(DT_ENT_NFS_ENT)))"}>}VLR_TOTAL_NFS_ENT),ID_NFS_ENT)) ---
and the second to get the previous month value
--- sum(aggr(sum(distinct{$<Mes {"$(=Month(AddMonths(Max(DT_ENT_NFS_ENT),-1)))"}>}VLR_TOTAL_NFS_ENT),ID_NFS_ENT)) ---
My issue is that when i filter a month, like mar, the month value was correctly filtered, but, the previous month value was turned into 0.
When I do not use filters, the current and previous month are correctly showed.
No filter (considering apr and mar):
Filtered (mar)
Thank you for the help
Very small correction. try this
sum(aggr(
sum(distinct {$<Mes = {"$(=Month(AddMonths(Max(DT_ENT_NFS_ENT),-1)))"}>} VLR_TOTAL_NFS_ENT),
ID_NFS_ENT
))
Hi
In order to achieve this, we need to ignore the Time filters
sum(aggr(sum(distinct{$<Mes= {"$(=Month(AddMonths(Max(DT_ENT_NFS_ENT),-1)))"}, monthfield=, yearfield=, monthyearfield=, datefield=>}VLR_TOTAL_NFS_ENT),ID_NFS_ENT))
Beside the other suggestions be aware that you may need to apply the conditions to each layer of the aggregation, means:
sum({ ... } aggr({ ... } sum({ ... } Field), Dim))
Hi guys, thanks for the replies, but, none of the methods worked here. The kpi remains zero when I filter the months.
My calendar field Mes is like this: "Month([DT_ENT_NFS_ENT]) as Mes" and I olny using this filed in the filter.