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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Matt22365
Resolver III
Resolver III

Calculated column or measure to review the highest result and return true or false

Hi All

Hoping someone can help

I have simplified my data below for the example

I need a calculation which will review all the tasks within a project (project number identifies which project is which) and returns whether any tasks in that project have a characteristic higher than 0. if it does I want it to return True, and False if only has 0

This is probably quite simple but I just cant get my head around it

Thanks in advance

Matt

Project NumberTask NumberCharateristic
110
121
132
210
312
323
412
420

 

1 ACCEPTED SOLUTION

Hi @amitchandak 

 

Thank you for your swift response, unfortuately I couldnt get your formula to work, however it did point me in the direction I needed to figure out a slightly different route which I do appreciate

 

My fix:

Calculated column to determine the Max characteristic value for each project (which I needed anyway)

Max Characterstic value =
VAR SID = 'Table'[ProjectNumber]
Return
Maxx(FILTER('Table','Table'[ProjectNumber]= SID),'Table'[Characteristic])
 
Then I did a 2nd column to determine whether IF Max Characteristic was "0" or blank to get my true and false statements
 
Thanks
Matt 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Matt22365 , a new column

 


new column =
var _cnt = countx(filter(Table, [Project Number] = earlier([Project Number]) && [Charateristic] =0 ), [Charateristic])
return
if(isblank(_cnt), false(), true())

 

 

a new measure

 


new measure =
var _cnt = countx(filter(allselected(Table), [Project Number] = max([Project Number]) && [Charateristic] =0 ), [Charateristic])
return
if(isblank(_cnt), false(), true())

Hi @amitchandak 

 

Thank you for your swift response, unfortuately I couldnt get your formula to work, however it did point me in the direction I needed to figure out a slightly different route which I do appreciate

 

My fix:

Calculated column to determine the Max characteristic value for each project (which I needed anyway)

Max Characterstic value =
VAR SID = 'Table'[ProjectNumber]
Return
Maxx(FILTER('Table','Table'[ProjectNumber]= SID),'Table'[Characteristic])
 
Then I did a 2nd column to determine whether IF Max Characteristic was "0" or blank to get my true and false statements
 
Thanks
Matt 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.