Forum Discussion

lucadelicio's avatar
lucadelicio
Icon for Impactful Individual rankImpactful Individual
1 year ago

Double Reference Line on x-axis on Line Chart doesn't disappear

Goodmorning Everybody,

i need your help.

As attachment demo project pbix file.

I create a line chart with period on the x-axis and value on the y-axis.

I need two different colors one for the period before and one for the period after a parameter.

If the parameter is not selected i don't need shade colour areas on the chart.

I create two reference lines connected with a measure that returns the date parameter or blank and activate the shade area colours.

The measure returns date only if the filter value is 1, otherwise return BLANK().
Everything works well when the measure returns the date but when the measure returns BLANK() only one shade area disappear, the other remain.
My need is to remove both the shade area when the measure returns BLANK().
Is it possible? I have to configure something else?

Thank you for your support so precious.

Bye

Luca

7 Replies

  • Create Two Separate Measures

    BeforePeriod = IF([YourMeasure] = 1, [YourDate], BLANK())
    AfterPeriod = IF([YourMeasure] = 1, [YourDate], BLANK())

    Instead of one reference line, add two (one for before and one for after). Set the "shaded area" for each.

    When the measure returns BLANK(), both shaded areas will disappear, because you have separate control over each.

     

    If this helped, a Kudos 👍 or Solution mark would be great!
    Cheers,
    Kedar Pande
    www.linkedin.com/in/kedar-pande

    • lucadelicio's avatar
      lucadelicio
      Icon for Impactful Individual rankImpactful Individual

      Also with this workaround the problem persist.

      Have you got any other idea?
      Thank you!

  • lucadelicio's avatar
    lucadelicio
    Icon for Impactful Individual rankImpactful Individual

    Goodmorning,

    can anyone try to help me?
    Do you think is better to suggest to the client to open a Microsoft ticket for this problem that i consider a bug?
    The behaviour of this object appears strange.
    If you need more information feel free to contact me, thank you very much.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi lucadelicio 

       

      I can see this strange behavior in the pbix file you provided. However, I can't currently find documentation or relevant case describing it to provide you with effective help. Suggest you open a ticket to get help from a dedicated Microsoft engineer.

       

      It would be great if you could continue to share here once you know the solution to help others who are experiencing similar problems.

       

      Thanks for your understanding.

       

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

      • lucadelicio's avatar
        lucadelicio
        Icon for Impactful Individual rankImpactful Individual

        Hi Anonymous thanks for your answer but i don't know how to open a ticket to get help from Microsoft.

        I'd appreciate if you could give me a contact name.

        Thank you very much.