Forum Discussion
Group values in column chart/bar chart
- 7 years ago
Hi Anonymous ,
By my tests, the solution of parry2k should be helpful.
I have made a test pbix to reproduce your scenario.
In addition, you could have a reference of the attachment.
Best Regards,
Cherry
Anonymous you can add another column and use that on x axis
New Code = IF( ISBLANK(Table[Code]), 9, Table[Code] )
Hey,
That is more or less what I have done, but it is not working.
Thia is my DAX:
Code =
IF(ISBLANK(Table[CODE]), "9",
IF(Table[CODE] = "1", "1",
IF(Table[CODE] = "2", "2",
IF(Table[CODE] = "3", "3",
IF(Table[CODE] = "4", "4",
IF(Table[CODE] = "9" , "9",
"Unknown")
)))))
- parry2k7 years agoSuper User
Anonymous did you tried what I sent? Not sure why you have to have more if condition, i think ask is if blank then 9 else whatever the code value is, isnt it?
- Anonymous7 years agoNot applicable
Hey parry2k ,
Not accurate.
I am trying to map the codes to readable values. Sorry, I cannot write the real values due to sensetive data.
I am using numbers here just to ilustrate.
So, if code is 1, show text_1,
if code is 2, show text_2
...
if code is 9 or blank, show text_9
So the users can read the values and not guess what is the meaning of each code.
Ta!
- parry2k7 years agoSuper User
Anonymous interesting, you can use switch statement, easy to work with
Switch ( Table[Code] , 1, "Whatever text", 2, "Whatever text", 9, "text for 9", "text for 9" --this will be final condition if nothing matches above and blank will fall here
)