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.
Hello, I am looking for some urgent help in fixing a DAX measure please.
I am essentially trying to create a measure using the IF Function based on what Month has been filtered on in the dashbaord, eg) if Jan is selected i want one formula to be used and if September is selected i want a different formula to be used.
I have the formulas for a False & True result from the if function ready but the trouble I am having is building the If Function formula and linking that to the Month table in the query, here is what I have so far when practicing with January, note I also tried "Jan";
Hi @Anonymous - use SELECTEDVALUE on the month.
Measure =
SWITCH( SELECTEDVALUE(Month[Month]),
"Jan", FormulaA,
"Feb", FormulaB,
...
)
SWITCH also helps you by not having imbedded IF statements. Here is a good site to help you with the language: https://dax.guide/ . It can give you more info on the functions mentioned here.
Hope this helps
David
Great thank you so much!!
Just one more follow on query please..
I'm playing around with the formula as i'm trying to get the first half of the year to have one result and the second half of the year to have a different result, i've tried this but it doesn't work:
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 |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |