Forum Discussion
Max data point for each month
- 4 years ago
Hi garzamalan ,
According to your description, I think there are some loopholes in your formula, the same client and the same month have not been not specified, and MAX function in a measure always return the current value, not the maximum value.
Here's my sample data, I modify the value of saldo column.
My solution is:
Cartera Hist = CALCULATE ( SUM ( CarteraSnapshots[saldo] ), 'CarteraSnapshots'[fecha_corrida] = MAXX ( FILTER ( ALLSELECTED ( CarteraSnapshots ), 'CarteraSnapshots'[Month] = MAX ( 'CarteraSnapshots'[Month] ) && 'CarteraSnapshots'[numclient] = MAX ( 'CarteraSnapshots'[numclient] ) ), 'CarteraSnapshots'[fecha_corrida] ) )Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi garzamalan ,
According to your description, I think there are some loopholes in your formula, the same client and the same month have not been not specified, and MAX function in a measure always return the current value, not the maximum value.
Here's my sample data, I modify the value of saldo column.
My solution is:
Cartera Hist =
CALCULATE (
SUM ( CarteraSnapshots[saldo] ),
'CarteraSnapshots'[fecha_corrida]
= MAXX (
FILTER (
ALLSELECTED ( CarteraSnapshots ),
'CarteraSnapshots'[Month] = MAX ( 'CarteraSnapshots'[Month] )
&& 'CarteraSnapshots'[numclient] = MAX ( 'CarteraSnapshots'[numclient] )
),
'CarteraSnapshots'[fecha_corrida]
)
)
Get the expected result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.