cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CTW Frequent Visitor
Frequent Visitor

Comparing column values with measure

Hi Power BI Professionals:

 

I'm trying to compare my measure with my columns to get another calculated column:

Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

FrPY is a measure and Goal is a column. What I need is for Status (calculated column) to compare FrPY and Goal where If(frPY<goal) then return a 1.

 

not all rows have a goal so I have filtered those away in the report level filter (if it affects the calculation)

 

The reason I want to do this is because conditional formatting cannot be set based off other columns. (I want to do a traffic light color if frpy<goal =red, frpy=goal = green

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Comparing column values with measure

@CTW,

 

You may add a measure as follows.

Measure =
IF ( [FrPY] < MAX ( Table1[Goal] ), 1, 0 )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support Team
Community Support Team

Re: Comparing column values with measure

@CTW,

 

You may add a measure as follows.

Measure =
IF ( [FrPY] < MAX ( Table1[Goal] ), 1, 0 )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

CTW Frequent Visitor
Frequent Visitor

Re: Comparing column values with measure

Thanks that worked!

 

sgovindarajan Frequent Visitor
Frequent Visitor

Re: Comparing column values with measure

@v-chuncz-msftThis worked for me. Can you tell me how adding MAX works though?

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 235 members 2,147 guests