Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I've got a column of about 20 people and their birthdays, and I'm creating a DAX measure specifically for the nieces and nephews who will get money for their birthday. Every birthday, they will get $5 plus their age.
I'm trying to say, IF [person] = "tanya", "bobby", "sarah", "troy", then [Current Age] + $5. How do you write that in DAX? Is that a switch statement?
Thanks!
Solved! Go to Solution.
Thanks so much for your responses, guys. I ended up using a SWITCH statement:
Thanks so much for your responses, guys. I ended up using a SWITCH statement:
Hi @bonjourposte
If the goal is a calculated column you can use this formula :
If you need the measure :
Pbix with the example is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
try this:
Birthday Amount =
VAR PersonList = {"tanya", "bobby", "sarah", "troy"}
VAR CurrentAge = [Current Age] -- Replace [Current Age] with your actual column name
RETURN
IF (
[Person] IN PersonList,
CurrentAge + 5,
BLANK() -- This will return blank if the person is not in the list
)
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 41 | |
| 39 | |
| 22 | |
| 21 |
| User | Count |
|---|---|
| 143 | |
| 106 | |
| 63 | |
| 38 | |
| 31 |