Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi! I am new to PBI and DAX. I've done a few simple If statements, but have not been able to figure this one out. I know this is probably elementary, but I have spent the about three hours trying to do a DAX formula that says this:
=IF(Table[Sum of Days]>1 and <=3,”Daily”
=IF(Table[Sum of Days]>3 and <=18,”Weekly”
=IF(Table[Sum of Days]>18 and <=28,”Monthly”
=IF(Table[Sum of Days]>29,”Other”
Otherwise Blank
I've used a dozen examples of similar conditions that I found in other solutions that you guys have provided, but I obviously don't know what I'm doing because I can't seem to modify this to any of the examples.
Can I do five conditions? Is that what is wrong? Should I be using AND instead of OR?
Thank you for any assistance!
Solved! Go to Solution.
@Blitz_40 - Use a SWITCH(TRUE()...) statement, not nested IF statements. Logic is cleaner, will make things very easy.
Column =
SWITCH(TRUE(),
[Sum of Days]>1 && [Sum of Days]<=3,”Daily”,
[Sum of Days]>3 && [Sum of Days]<=18,”Weekly”,
[Sum of Days]>18 && [Sum of Days]<=28,”Monthly”,
[Sum of Days]>29,”Other”,
BLANK()
)
@Blitz_40 - Use a SWITCH(TRUE()...) statement, not nested IF statements. Logic is cleaner, will make things very easy.
Column =
SWITCH(TRUE(),
[Sum of Days]>1 && [Sum of Days]<=3,”Daily”,
[Sum of Days]>3 && [Sum of Days]<=18,”Weekly”,
[Sum of Days]>18 && [Sum of Days]<=28,”Monthly”,
[Sum of Days]>29,”Other”,
BLANK()
)
@Greg_Deckler Thank you! I will be frank and say that I am not familiar with SWITCH.
I need to explore the difference so I can understand the application. I appreciate it!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 10 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 11 | |
| 8 | |
| 8 | |
| 8 |