Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
msae26
Frequent Visitor

Monthly consumption

Hi guys

 

I really need your help. I have a view with accumulatives per day of water, vapor of water and gas consumption. Base on that information I calcualted the effiency ("Rendimento ET mensile" column), until here all right. But I need a view where I can get the monthly effiency base on the monthly accumulative.

 

msae26_0-1653492516392.png

 

Something like this:

 

Dataore_marcia_mensilemensile_consumo_COGE_Acqua_calda_MWhtmensile_consumo_ET_COGE_Vapore_MWthmensile_consumo_GN_COGE_SmcRendimento ET mensile
01-202247026021814224934,56%
02-202263635331019246035,45%
03-202250131023815231435,99%
04-20227246322205634,42%

 

Thanks in advance to all who reply.

 

 

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

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.

vcazhengmsft_0-1653903859374.png

 

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

View solution in original post

4 REPLIES 4
v-cazheng-msft
Community Support
Community Support

Hi @msae26,

 

May I know whether you still have problems? If I misunderstand your needs, please feel free to let me know. Thanks in advance!

 

Best Regards,

Community Support Team _ Caiyun

v-cazheng-msft
Community Support
Community Support

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.

vcazhengmsft_0-1653903859374.png

 

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

daXtreme
Solution Sage
Solution Sage

Is it not enough to create a table in the model that would pull out of the cumulative view only the data for the last day of each month?

HI daXtreme

What more do i need to ?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.