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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
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.