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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Is there a way in Dax to hardcode id=6 to id=9 in a measure?
| ID | Code | No |
| 1 | AAA | 12 |
| 2 | BBB | 23 |
| 3 | CCC | 22 |
| 4 | DDD | 33 |
| 5 | EEE | 44 |
| 6 | FFF | 50 |
| 7 | FFF | 50 |
| 8 | FFF | 50 |
| 9 | FFF | 50 |
Solved! Go to Solution.
Hi @tony-G_2020 ,
You can write a simple formual conditional formula to for that that may not be what you want.
=
IF ( SELECTEDVALUE ( data[ID] ) = 6, 9, SELECTEDVALUE ( data[ID] ) )
But measures are affected by the columns you put in a visual. If you don't place the ID column, you won't get the correct result.
Hi @tony-G_2020 ,
You can write a simple formual conditional formula to for that that may not be what you want.
=
IF ( SELECTEDVALUE ( data[ID] ) = 6, 9, SELECTEDVALUE ( data[ID] ) )
But measures are affected by the columns you put in a visual. If you don't place the ID column, you won't get the correct result.
Hi,
What is the end goal? What do you want to achieve?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |