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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Error bars are not hidden even if it's explicitly written in measure

Error bars are not behaving as expected.
In line graph I'm able to show my dynamics targets using the new feature error bars.
But I would like to keep error bars hidden until user has filtered only one line to the graph.

I'm using Error bars with following measure:
Error bar measure =
IF( HASONEVALUE ( Dim[column]), [target measure), BLANK())

This measure works as expected with other analysis lines (eg. Y-Axis Constant line or Min line), but Error bars are showing up without any regard to HASONEVALUE function in measure.


Status: Needs Info

Hi @Jameli 

I tried to restore the scenario you mentioned, but failed. Can you describe your problem in detail through a sample or video?

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @Jameli 

I tried to restore the scenario you mentioned, but failed. Can you describe your problem in detail through a sample or video?

 

Best Regards,
Community Support Team _ Ailsa Tao

Jameli
Frequent Visitor

Hey @v-yetao1-msft
Thanks for looking into this. Here's an example case where I'm unable to get desired result.

I have a line visual where I have Month as X-axis, Sold products in Y-axis and Location as Legend.
In addition, I would also like to have target value for "sold products" shown in graph, but ONLY when there is only 1 location in visual.
Target value is dynamic, changes each month and calculated in measure [Sold products target].

I'm unable to use constant line as my target, since value is constant it does not change each month. Currently I'm getting dynamic monthly values with Error bars, but they are not behaving as expected.
When I put the following Measure in constant line, constant line hides itself when all locations are in visual:

Measure = 

IF(
    HASONEVALUE('DimLocation'[location]),              
    [Sold products target],
    BLANK()
)

Jameli_1-1672667886473.png

 

Now I filter down to 1 location (green line in this case) and the constant line shows up.
Jameli_2-1672667928020.png

Everything working as expected up to this point.

Now I change constant line to Error bars and use the same target measure (as defined above):
I have the same result when selecting one location (green line), looks ok.

Jameli_6-1672668253064.png

 


But now when I clear filter and have all the locations in the visual, target lines still show up even though the measure is written to explicitly hide them (show BLANK()).

Jameli_5-1672668228991.png

 

This example is made with constant line, but all the other lines in analysis tab behave as expected but not Error bars. Eg. Min line, Max line, Average line..
I have also tried re-writing the target measure: used ISFILTERED instead of HASONEVALUE and used variables and changing the logical order in IF. But none of these have worked.

I would assume this is an error in "Error bars" -feature, as it is not behaving like other analysis tab lines.