Forum Discussion
How can I make string values to appear on pivot table?
I'm not sure how you are doing that with a Matrix visualization honestly, if you try to use a Text field in the Value for a Matrix, it tends to want to count it versus giving you the text.
- greggyb10 years agoResident Rockstar
A measure can return a text datatype. If you can write a measure that evaluates to a single text value appropriately, it should work in a matrix.
- keondopark10 years agoRegular Visitor
Can you explain in detail??
- greggyb10 years agoResident Rockstar
Make a measure, and instead of evaluating arithmetic, evaluate a string:
// DAX // All below are measures in my model MyMeasureReturnsText! = "This measure returns text" This Measure returns text based on a field value! = CONCATENATEX( VALUES( 'Sample'[SomeField] ) ,SWITCH( 'Sample'[SomeField] ,1, "That's a one" ,2, "Well that looks like a 2" ,3, "By golly, thats a seventeen!" ) )
My 'Sample' is just a 3-row table with values of [SomeField] = 1, 2, 3.
You can see that my matrix uses [SomeField] as the row labels. My measures are both in the Values area. Each returns text.
I'm happy to help more, but I don't know what sort of detail you're looking for.
- keondopark10 years agoRegular Visitor
Maybe I made a mistake in writing.
I used Matrix for the numeric data, and Table for string data.
As you said, it automatically counts.