Unable to visualize string data in pivot table

I am trying to visualize the “ProjectCode” in cells of Pivot Table. But it is showing as 1 as it is assuming as a value. Is there any option of filling the cells with the exact data?
Analysis -

Sample data -
|1|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-16 00:00:00.000|BCM_0009|
|2|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-17 00:00:00.000|Holiday|
|3|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-18 00:00:00.000|Holiday|
|4|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-19 00:00:00.000|Holiday|
|5|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-20 00:00:00.000|BCM_0009|
|6|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-21 00:00:00.000|BCM_0009|
|7|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-22 00:00:00.000|BCM_0009|
|8|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-23 00:00:00.000|BCM_0009|
|9|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-24 00:00:00.000|Holiday|
|10|Sukhen Paul|1607|PIS00017 || Sourav Dutta|2024-08-25 00:00:00.000|Holiday|

Hi @Abhisek94,
It looks like you’re aggregating your Project Code by ‘Count’ so that may be why you’re getting 1 for every cell. Have you tried creating a toString calculation for this scenario?

Hi @Abhisek94 -

QuickSight doesn’t support the attr() function for displaying unique string values like Tableau does. In a pivot table, QuickSight tries to aggregate measures, which are typically numeric or date fields. This is why you’re seeing the count of a string rather than the string value itself—because QuickSight is treating your string data as a measure and counting occurrences instead of displaying the actual text.

Additionally, the MIN() and MAX() functions in QuickSight don’t work on strings, as they’re designed for numeric or date fields.

You could try concatenating fields like employee name and project code, then using a table visual, but honestly, this workaround probably won’t suit your needs.

I suggest adding the feature request tag to your post to support one or both of these features being added to QuickSight.

Hey @Brett, thanks for replying
Project code is already in a string format.
I am not finding any option to aggregate other than count and count distinct. This is a major limitation of Quicksight

Hey @robdhondt
Indeed! My mind is scrambled up thinking as to why Quicksight has these types of limitations.
Could you shed some light as to how to request this feature and how much approximately will be the ETA? This is a very important report for management and we might shift to Power BI if this cannot be solved on an urgent basis.

Not sure if this would work, please check if firstvalue() can be used. You will need to create a field with custom aggregation and add it in values.

1 Like

That almost works, but not for this particular use case.

The firstValue and lastValue functions won’t work in a pivot table because both the measure and the order values in the table calculation must be used in either the rows or columns of the pivot table. However, placing these fields in the rows or columns results in every unique value being shown, which does not produce the intended visual where the string is treated as the measure rather than as a column or row value.

@emilyzhu – sorry for the tag :slight_smile: … do you have any updates on an attr function?

1 Like

@robdhondt Do we have any update for this? If so, someone please tag this as a feature request because this report is very crucial. Feature request needs to be integrated very soon

Hi @Abhisek94,
I’ve gone ahead and tagged this as a feature request for the time being.

2 Likes

Hey @Brett any update on this feature request?

Hi @Abhisek94

I am not sure if I understand the issue here clearly. Per your screenshot you have Project Code in teh values section of the Pivot which means it will be treated as a column to be measured. If you shift that to the rows or columns section you should see the Project code as a Group by field.

What is the metric that you will measure these fields with Employee, Date, Project …what is the metric? That should get into the Values field.

String values. Currently it supports only numerical values.
I have the need to display string values like ‘BCM_0009’,‘Holiday’ suited to the query

1 Like

Hi @Abhisek94,
I marked this topic as a feature request for the support team’s visibility however I am unable to provide a timeframe of what’s ahead on the roadmap as there are many requests made through the community. You can keep an eye on features that become available through the ‘What’s New’ tab.
If this is a more business critical issue, I would suggest creating a support ticket for further assistance on your specific case!

Thank you