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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
carlosroston202
New Member

Consumo Medio Fixo

Olá! Gostaria de uma ajuda com a medida Consumo Medio Fixo. Ela está exibindo a linha no gráfico para os meses que estão sem dados. Como posso ajustar esta medida de forma que não apareça a linha nos meses em que não esxitem dados?

Hello! I'd like some help with the Average Fixed Consumption metric. It's displaying a line on the graph for months with no data. How can I adjust this metric so that the line doesn't appear in months with no data?


Consumo Medio Fixo =
CALCULATE(
    AVERAGEX(
        SUMMARIZE(
            'dCalendário',
            'dCalendário'[Ano],
            'dCalendário'[Mês]),
    [Qtd Total]),
ALL('dCalendário'),
VALUES('dCalendário'[Ano])
)

Screenshot_1.png

Link do arquivo pbix:

https://drive.google.com/drive/folders/1YIuUa9X_AeTtxXaitQl-mjiy3NY0QF2j

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

Please try something like below.

 

Consumo Medio Fixo =
IF (
    [Qtd Total],
    CALCULATE (
        AVERAGEX (
            SUMMARIZE ( 'dCalendário', 'dCalendário'[Ano], 'dCalendário'[Mês] ),
            [Qtd Total]
        ),
        ALL ( 'dCalendário' ),
        VALUES ( 'dCalendário'[Ano] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
V-yubandi-msft
Community Support
Community Support

Hi @carlosroston202 ,

Thanks for posting your query in the Microsoft Fabric Community. I've implemented the logic using a filtered average approach, and the output now reflects the behavior you described.

The Average Fixed Consumption line is displayed only for months where [Qtd Toatal] contains valid data, and it's automatically suppressed in months without entries keeping the visual clean and accurate.

Vyubandimsft_0-1757419611414.png

 

For your reference, I've attached the PBIX file. Feel free to review it and let me know if you need any additional details or adjustments.

 

Thanks for your prompt response @Jihwan_Kim .

Regards,
Yugandhar.

carlosroston202
New Member

Deu certo! Muito obrigado amigo.

Jihwan_Kim
Super User
Super User

Hi, 

Please try something like below.

 

Consumo Medio Fixo =
IF (
    [Qtd Total],
    CALCULATE (
        AVERAGEX (
            SUMMARIZE ( 'dCalendário', 'dCalendário'[Ano], 'dCalendário'[Mês] ),
            [Qtd Total]
        ),
        ALL ( 'dCalendário' ),
        VALUES ( 'dCalendário'[Ano] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.