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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dicarva
Frequent Visitor

Problem with Reference Line when trying to update filters

Hi there,

I'm new to BI, and I would like to know, if there is a way to correct the problem with two references lines in graphic bars.
I have two lines and when I click on the date to filter, in a year that doesn't have any values, one reference disappears (which is okay) and the other one goes to the bottom, and this one should also disappear. For each line I have measures.
Is this a BI problem or am I so dumb?

Thank you! 🙂

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @dicarva 

Please provide a workable sample data and your expected result from that. It is hard to figure out what you want to achieve from the description alone.  

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
hnguy71
Super User
Super User

Hi @dicarva 
Do you mind sharing your measures used? Typically if you select a date or a period and there are no values, the reference line should automatically go away. Perhaps you could add an additional criteria on top to force it to disappear.



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Thank you for answer.
I will share the graph and the measures for a better understand.
This is the correct graphc aspect:

Captura de ecrã 2024-10-31 084607.png

 Then when I clicked in the filter this happens:

Captura de ecrã 2024-10-31 084718.png

 
The first measure: 

MedidaByPass = CALCULATE(
        AVERAGEX(
            FILTER(
                CenariosIDE,
                CenariosIDE[Estado] = TRUE &&
                CenariosIDE[Descricao] = "CER Bypass"
            ),
            CenariosIDE[Valor]
        ),
        USERELATIONSHIP(CenariosIDE[Ano], Calendar[Ano])
    )

Another measure: 
MedidaMeta =
    CALCULATE(
        AVERAGEX(
            FILTER(
                CenariosIDE,
                CenariosIDE[Estado] = TRUE &&
                CenariosIDE[Descricao] = "Meta"
            ),
            CenariosIDE[Valor]
        ),
        USERELATIONSHIP(CenariosIDE[Ano], Calendar[Ano])
    )



Captura de ecrã 2024-10-31 084918.png

I'm sorry because my Bi is in Portuguese.

I hope this can help you to understand.

Hi @dicarva 

Can you try this?

MedidaMeta =

VAR _Result = 
    CALCULATE(
        AVERAGEX(
            FILTER(
                CenariosIDE,
                CenariosIDE[Estado] = TRUE &&
                CenariosIDE[Descricao] = "Meta"
            ),
            CenariosIDE[Valor]
        ),
        USERELATIONSHIP(CenariosIDE[Ano], Calendar[Ano])
    )

RETURN

If( _Result > 0, _Result, Blank() )


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

No, it doesn't work.

Can you share a sample pbix ?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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