Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |