Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
67 | |
65 | |
57 | |
39 | |
27 |
User | Count |
---|---|
85 | |
59 | |
45 | |
43 | |
38 |