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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Spotto
Helper IV
Helper IV

Graph showing data that doesn't exist

hello everyone, I have a measure that makes the accumulated percentage of an average (graph), but when I select a name that does not have the date 09/06 the graph shows the date even though it is without value, is there any form of the graph not show date that doesn't exist when selected?

 

Meta_Acum_Analista = CALCULATE(
    AVERAGE(base_Meta_Atingida_Diaria[META_DIARIA_ATINGIDA]),
    FILTER(ALL(base_Meta_Atingida_Diaria[DATA_DAILY_META]),
    base_Meta_Atingida_Diaria[DATA_DAILY_META]<=MAX(base_Meta_Atingida_Diaria[DATA_DAILY_META])
    )
)



Spotto_0-1687198752531.png

 

Select name ALISSON S: 

 

Spotto_1-1687198891744.png

the date 09/06 does not exist for ALISSON but it continues to show in the graph

 

Thank you for your help

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Spotto ,

It sounds like you're trying to create a Power BI measure that calculates the accumulated percentage of an average, but you're having trouble with the graph displaying dates that don't have any values. One way to solve this issue is to modify your measure to include a filter that excludes dates that don't have any values. You can do this by adding an additional condition to your FILTER function that checks if the date has any values before including it in the calculation. Here's an example of how you could modify your measure:

Meta_Acum_Analista =
CALCULATE (
    AVERAGE ( base_Meta_Atingida_Diaria[META_DIARIA_ATINGIDA] ),
    FILTER (
        ALL ( base_Meta_Atingida_Diaria[DATA_DAILY_META] ),
        base_Meta_Atingida_Diaria[DATA_DAILY_META]
            <= MAX ( base_Meta_Atingida_Diaria[DATA_DAILY_META] )
            && COUNTROWS (
                FILTER (
                    base_Meta_Atingida_Diaria,
                    base_Meta_Atingida_Diaria[DATA_DAILY_META]
                        = EARLIER ( base_Meta_Atingida_Diaria[DATA_DAILY_META] )
                )
            ) > 0
    )
)

 

This modified measure includes an additional condition that checks if the count of rows with the selected date is greater than 0 before including it in the calculation. This should prevent the graph from displaying dates that don't have any values.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Spotto ,

It sounds like you're trying to create a Power BI measure that calculates the accumulated percentage of an average, but you're having trouble with the graph displaying dates that don't have any values. One way to solve this issue is to modify your measure to include a filter that excludes dates that don't have any values. You can do this by adding an additional condition to your FILTER function that checks if the date has any values before including it in the calculation. Here's an example of how you could modify your measure:

Meta_Acum_Analista =
CALCULATE (
    AVERAGE ( base_Meta_Atingida_Diaria[META_DIARIA_ATINGIDA] ),
    FILTER (
        ALL ( base_Meta_Atingida_Diaria[DATA_DAILY_META] ),
        base_Meta_Atingida_Diaria[DATA_DAILY_META]
            <= MAX ( base_Meta_Atingida_Diaria[DATA_DAILY_META] )
            && COUNTROWS (
                FILTER (
                    base_Meta_Atingida_Diaria,
                    base_Meta_Atingida_Diaria[DATA_DAILY_META]
                        = EARLIER ( base_Meta_Atingida_Diaria[DATA_DAILY_META] )
                )
            ) > 0
    )
)

 

This modified measure includes an additional condition that checks if the count of rows with the selected date is greater than 0 before including it in the calculation. This should prevent the graph from displaying dates that don't have any values.

 

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

@Anonymous tks for your help , but but I put your measurement suggestion and the graph keeps showing the day 09/06 with no value

Spotto_0-1687373614213.png
I'll leave an example of the file so you can analyze it, thanks again for the help
example.pbix 

 

 

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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