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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mjanecek
Helper I
Helper I

Issue Using a Measure as Field Value Format Style for Column Chart

I have created the below measure to set a color for the bar on the combo chart to one color and the remainder of the bars to another color, according to the current monthly value of the "SRU Avg Premium No $0 Transactions" Measure.

 

Premium Colored =
var maxprem = MAXX(ALLSELECTED('Calendar'[Accounting Month]),[SRU Avg Premium No $0 Transactions])
var curprem = [SRU Avg Premium No $0 Transactions]
var result = if(curprem = maxprem,"#215479","#CCCCCC")
RETURN result
 
When I try to apply the measure to the format style of the combo chart, as a Field Value, the drop down to select the field to base the format on is colored red and won't allow me to select any of my measures.
 
mjanecek_0-1672754494691.png

I am running the Dec 2022 version of PBI Desktop, so that is not the issue.

 

Mark Janecek 

Business Intelligence Analyst

Amwins Insurance Group

 
 
1 ACCEPTED SOLUTION
technolog
Super User
Super User

@mjanecek I have similar problem.

You can fix it in 3 steps:

1. Set one color in the measure without any conditions

2. Set this measure for visualization
3. Set the right condition in the measure to calculate the color

 

Screenshot 2023-08-23 at 00.35.55.png

Screenshot 2023-08-23 at 00.36.17.png

p.s. Setting the measure type as "Text" has helped in the past, but that no longer works for me now

  

View solution in original post

7 REPLIES 7
technolog
Super User
Super User

@mjanecek I have similar problem.

You can fix it in 3 steps:

1. Set one color in the measure without any conditions

2. Set this measure for visualization
3. Set the right condition in the measure to calculate the color

 

Screenshot 2023-08-23 at 00.35.55.png

Screenshot 2023-08-23 at 00.36.17.png

p.s. Setting the measure type as "Text" has helped in the past, but that no longer works for me now

  

mjanecek
Helper I
Helper I

I was able to solve this issue by changing the data type of the measure from whole number to Text.

Pragati11
Super User
Super User

Hi @mjanecek ,

 

Can you please elaborate on what option are you using to apply this condition formatting using measure on your chart?

Are you using the same option as shown in the screenshot below:

Pragati11_0-1672756799916.png

I am able to use measures here, so wanted to understand what option you are using.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi Pragati: That is exactly the option I'm trying to use.

 

mjanecek_0-1672757437530.png

 

When I select "Field Value" the drop down to chose a filed is colored red on the boarder and will not allow me to select a measure from my model.

 

mjanecek_1-1672757499417.png

 

I can find the measures in the model, but when I try to pick one, it does not show as selected in the drop down.

 

mjanecek_2-1672757592019.png

 

Mark Janecek

Business Intelligence Analyst

Amwins Insurance Group

HI @mjanecek ,

 

Can you try selecting the measure after searching for it please?

I checked at my end and it works perfectly fine. I don't seem to see any issue in there. You see the red higlight on the what field should be base on? area, but it works when you select the searched measure.

See the small video attached below:

 

t1.gif

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Pragati:  When I try to select a measure, nothing shows in the drop down.

This is exactly what I see when I try to select a measure.

mjanecek_0-1672758458947.png

 

I see that there is no red highlight in your video on the drop down box.  I updated my version of PBI Desktop, restarted and checked Options and settings for anything that may have been off, and I still can't select a measure here.

 

MJ

Hi @mjanecek ,

 

I do see a RED highlight on the formatting option on my side. It remains red until I select anything from the dropdown. Not sure what is happening at your end. Can you try re-creating your visual and test this?

If still issue can you share your power bi file removing any sensitive information from it?

You can share using Dropbox or WeTransfor.

 

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors