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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SteveWave
Frequent Visitor

Error Bars doesn't work with upper field value

Dear Community,

I tried to use the error bar option to illustrate the increase/decrease from the previous to current current month.

 

 

Bild1.png

Bild3.png

 

My Measure-2 =
IF(
    SELECTEDVALUE('Metric-2'[Metric-2]) = "Current Month",
    [Sales_total],
    [Prev month Sales]
    )

 

Therefore, I used for the error bar field value the following measure:

 

Upper =
IF(
    SELECTEDVALUE('Metric-2'[Metric-2]) = "" &&
    [Prev month Sales] < Sales[Sales_total],
    Sales[Sales_total], BLANK()
)
 Bild2.png

Unfortunately, it doesn't show up any bar. With the percentage options it perfectly works and correctly shows the bars.

Is there something wromg with the syntax of the upper measure ?

Best and thanks for your help.

1 REPLY 1
Anonymous
Not applicable

Hi @SteveWave 

 

I suggest you change the code to look like this:

 

Upper =
IF(
    SELECTEDVALUE('Metric-2'[Metric-2]) = "Current Month" &&
    [Prev month Sales] < [Sales_total],
    [Sales_total], 
    BLANK()
)

 

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.