Forum Discussion
keondopark
10 years agoRegular Visitor
How can I make string values to appear on pivot table?
Hi, I am now trying to make the date records into table format.
But the data column contains both numeric and string values
For example, if you have a dataset as below,
Key RowID ColID Data...
keondopark
10 years agoRegular Visitor
Can you explain in detail??
greggyb
10 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.