Forum Discussion
Calculation annual change (values in columns)
- Anonymous2 years ago
Hi Syndicate_Admin ,
Because this formula is conformed in my scenario, your PBIX doesn't have this table name, you need to replace the name of each table in the formula with the name of the table in your own PBIX
For example, in your picture: table name: 2022-1
Measure = var _today=TODAY() var _2022= SUMX( FILTER(ALLSELECTED('2022-1'), '2022-1'[flujo]=MAX('2022-1'[flujo])&&'2022-1'[cod_taric]=MAX('2022-1'[cod_taric])&& '2022-1'[ano]=YEAR(_today)-1),[euros]) var _2023= SUMX( FILTER(ALLSELECTED('2022-1'), '2022-1'[flujo]=MAX('2022-1'[flujo])&&'2022-1'[cod_taric]=MAX('2022-1'[cod_taric])&& '2022-1'[ano]=YEAR(_today)),[euros]) return _2023 - _2022Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Syndicate_Admin ,
Because this formula is conformed in my scenario, your PBIX doesn't have this table name, you need to replace the name of each table in the formula with the name of the table in your own PBIX
For example, in your picture: table name: 2022-1
Measure =
var _today=TODAY()
var _2022=
SUMX(
FILTER(ALLSELECTED('2022-1'),
'2022-1'[flujo]=MAX('2022-1'[flujo])&&'2022-1'[cod_taric]=MAX('2022-1'[cod_taric])&&
'2022-1'[ano]=YEAR(_today)-1),[euros])
var _2023=
SUMX(
FILTER(ALLSELECTED('2022-1'),
'2022-1'[flujo]=MAX('2022-1'[flujo])&&'2022-1'[cod_taric]=MAX('2022-1'[cod_taric])&&
'2022-1'[ano]=YEAR(_today)),[euros])
return
_2023 - _2022
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.