Forum Discussion
Monthly consumption
- 4 years ago
Hi msae26,
Firstly, you need create a new column with Calculated column.
Month-Year = VAR month_ = MONTH ( 'Table'[Data] ) VAR year_ = YEAR ( 'Table'[Data] ) RETURN IF ( month_ < 10, "0" & month_ & "-" & year_, month_ & "-" & year_ )Then, you need create Measures for the fields you would like to add into the new visual. For example, you can get the desired value from ore_macia_mensile by using the following Measure.
ore_macia_mensile__ = VAR maxDate = CALCULATE ( MAX ( 'Table'[Data] ), VALUES ( 'Table'[Month-Year] ) ) RETURN CALCULATE ( 'Table'[Ore__Marcia__Mensile], FILTER ( 'Table', 'Table'[Data] = maxDate ) )Then, the result looks like this.
To get other values, you just need make some changes to this Measure.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi msae26,
Firstly, you need create a new column with Calculated column.
Month-Year =
VAR month_ =
MONTH ( 'Table'[Data] )
VAR year_ =
YEAR ( 'Table'[Data] )
RETURN
IF ( month_ < 10, "0" & month_ & "-" & year_, month_ & "-" & year_ )
Then, you need create Measures for the fields you would like to add into the new visual. For example, you can get the desired value from ore_macia_mensile by using the following Measure.
ore_macia_mensile__ =
VAR maxDate =
CALCULATE ( MAX ( 'Table'[Data] ), VALUES ( 'Table'[Month-Year] ) )
RETURN
CALCULATE (
'Table'[Ore__Marcia__Mensile],
FILTER ( 'Table', 'Table'[Data] = maxDate )
)
Then, the result looks like this.
To get other values, you just need make some changes to this Measure.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun