cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrickByGecko
Resolver I
Resolver I

Conditionnal Formating with pure field

Hello

I'm trying to have conditionnal Color formating on a simple numeric Field (here underneath CodeProjectID) but the menu panel always propose to have condition on the number of CodeProjectID not the value of CodeProjectID. What am I doing wrong?

Powerbi.png

1 ACCEPTED SOLUTION

Use MAX for this. MAX will return the max value, but both MIN and MAX have a unique characteristic where they will convert a field to a scalar value if there is only one value in your field.

 

So MAX(Table[CodeProjectID]) will work



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

5 REPLIES 5
edhans
Super User
Super User

Because the value field you are using is not a number, but a field, so it has however many records are in your table. It needs to do Count, First, Max, or something to get to a single, also called scalar, value.

 

That is why a measure will work as is, a measure always returns a scalar value.

 

What Power BI is doing is actually creating an implicit measure, like COUNT(Table[YourField]) or MAX, or FIRST, or whatever.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

 

Thanks.

IS there anyway to compute a measure for instance from this field to be able to condition on the value itself? For instance New Measure TEST = 0+ CodeProjectID (I tried it does not work).

Use MAX for this. MAX will return the max value, but both MIN and MAX have a unique characteristic where they will convert a field to a scalar value if there is only one value in your field.

 

So MAX(Table[CodeProjectID]) will work



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

 

Thanks a lot, it's working!

Great! Glad my solution helped.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors