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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I am looking to use the hasonevalue and switch true to dynamically present some trend information using a field parameter.
The below is the error and dax I currently have.
Any help would be great.
Error:
Calculation error in measure 'Switch Measures[Test Switch Value BUD Financial]: Column [Parameter Trend] is part of composite key, but not all columns of the composite key are included in the expression or its dependant expression
Dax:
Solved! Go to Solution.
@trwatts , there is challenge when we directly check the value. I have used this code to check the selected value
What is selected = maxx(filter('Axis Slicer', 'Axis Slicer'[Axis Slicer Order]= SELECTEDVALUE('Axis Slicer'[Axis Slicer Order])),'Axis Slicer'[Axis Slicer])
Check if that is blank means , nothing selected
or try hasonevalue on order column
@trwatts , there is challenge when we directly check the value. I have used this code to check the selected value
What is selected = maxx(filter('Axis Slicer', 'Axis Slicer'[Axis Slicer Order]= SELECTEDVALUE('Axis Slicer'[Axis Slicer Order])),'Axis Slicer'[Axis Slicer])
Check if that is blank means , nothing selected
or try hasonevalue on order column
Worked it out.
Thank you for your help it is greatly appreciated. 🙂
Thanks @amitchandak
I have tried the order value in the hasonevalue section and havent had any luck.
Not sure exactly where to drop the formula you gave into the dax?
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 |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |