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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
nataliesmiy1357
Helper IV
Helper IV

Creating a custom formula

Hello!  I am not sure how to go about the dax formula that I want to make...

 

I want to make a formula, that does this:

 

Takes the minimum no. of TMs, and if that number of people in the table above have a 3 or above, then it's a yes, and if not, it's no.  

 

So in this screenshot, I need 4 people to have a score of 3 or above.  and because none of them do, the answer would be no.

 

So the tables with the entities are:

tablea[score] - which values are 0-4

tableb[numberOfTMs]

 

Please let me know if you can help!!

 

nataliesmiy1357_0-1638208405910.png

 

 

6 REPLIES 6
Anonymous
Not applicable

Sorry, I think an IF statment will be what you are looking for. 

 

It will be something like this: IF(tableb[numberOfTMs]) => 3, "YES","NO")

okay.... When I try to type that in, I can't bring in some of the values.  Attached is my entities.  (Proficiency number is my number of team members)

 

I was going to type in: IF ( count(employeeName) >= proficiencyNu, 'YES', 'NO')

 

But it won't let me bring in proficiency number.

 

nataliesmiy1357_0-1638281242619.png

 

Anonymous
Not applicable

Hi @nataliesmiy1357 

 

Try this? (My columns are purely examples.)

 

TestMeasure = 
VAR limit = MAX('Chapters'[Chapter ID])

RETURN
    IF (COUNT(Characters[Character Name])>=limit,"YES","NO")

 

So this worked I think this worked.... but now when I put it into my table, it gets rid of my filters and shows more rows than normal.... 

 

before:

nataliesmiy1357_0-1638364933915.png

after:

nataliesmiy1357_1-1638364970739.png

 

nataliesmiy1357
Helper IV
Helper IV

I'm not sure what a switch statement is.... how would I write that?

Anonymous
Not applicable

Hi

 

A switch statement would probably work for this?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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