Forum Discussion
Measure on Axis in grouped bar chart
- Anonymous2 years ago
Hi Hidrolix ,
The reason that the measure you create can only go to the legend and not to the y-axis is that all measures return a text type result and not a number. Please add "VALUE( " at the beginning of all measures and " )" at the end.2U Count = VAR __text = SELECTEDVALUE( 'ContiguousUSpace'[ContiguousUSpace] ) VAR A = LEFT( __text, SEARCH( ",", __text, 1, 1 ) -1 ) RETURN VALUE(A)3U Count = VALUE(PATHITEM(SUBSTITUTE('ContiguousUSpace'[Calc ContiguousUspace],",", "|"), 2))4U Count = VALUE(PATHITEM(SUBSTITUTE('ContiguousUSpace'[Calc ContiguousUspace],",", "|"), 3))The final output is below:
Please adjust the number of decimal places.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the response 🙂 Now I feel silly I didn't saw the formatting was wrong.
And indeed the 3U and 4U worked flawlessly!! For the 2UCount the formula did not work, but I adjusted it so it worked the same as 3U and 4U.
2U Count = VALUE(PATHITEM(SUBSTITUTE('ContiguousUSpace'[Calc ContiguousUspace],",", "|"), 1))