Forum Discussion
MAX FUNCTION AND SLICER VALUE
- Anonymous5 years ago
Hi gabrielefugazzi,
It seems like you are facing the find out the previous record in the discontinued table based on conditions, right?
If this is the case, I think you can extract the current date and calculate with a fixed numerical value should not suitable for our conditions.
You need to use condition and current date to filter on your table records to get a list of records, then extract the maximum one of them and this one should meet the previous records requirement.
Measure= VAR currdate = MAX ( fatturato[anno_fattura] ) VAR prevdate = CALCULATE ( MAX ( fatturato[anno_fattura] ), FILTER ( ALL( fatturato ), [anno_fattura] < currdate && 'other conditions' ) ) RETURN 'your formula'For measure on total level calculations, you can refer to the below blog:
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng
Hi gabrielefugazzi,
It seems like you are facing the find out the previous record in the discontinued table based on conditions, right?
If this is the case, I think you can extract the current date and calculate with a fixed numerical value should not suitable for our conditions.
You need to use condition and current date to filter on your table records to get a list of records, then extract the maximum one of them and this one should meet the previous records requirement.
Measure=
VAR currdate =
MAX ( fatturato[anno_fattura] )
VAR prevdate =
CALCULATE (
MAX ( fatturato[anno_fattura] ),
FILTER (
ALL( fatturato ),
[anno_fattura] < currdate
&& 'other conditions'
)
)
RETURN
'your formula'
For measure on total level calculations, you can refer to the below blog:
Measure Totals, The Final Word
Regards,
Xiaoxin Sheng