2 Or More values in a Single Cell

Hi Team , Is it possible to have a pivot table with Value and percentage in the same cell similar to Tableau .(Attaching reference screenshot)


I saw converting them to string and concatenating is the only possible solution.
So I tried that approach but since I needed only 2 decimals I used a combination of toString and Round. But Even though my round calculations are working fine individually they are returning 4 decimals when used with toString. Is there any other workaround I can do?

concat(
toString(round(sum({Monthly Compensation}), 2)),
" (",
toString(round({Monthly compensation percentage} * 100, 2)),
“%)”
)
This is the calculated field and this is the output

Concat is the calculated field and other 2 I checked individually

Hi @vinay-vikram,
Check out this old post on the community that dives into a similar scenario.

Let me know if this helps for your case or if you have any additional questions!

I am not able to understand exactly how it can be used in my case . Can you edit the formula in my Question if possible? If there is any better way to represent the table without concatenating then that also is fine for me . The use case is to show how Quicksight can be used for the dashboards in Tableau

Hi @vinay-vikram,
Have you tried using substring within your concat calculation? That way, you can set the point where your concat function takes place (and how many positions you’d like to include). The biggest issue you may encounter would be that for single digit numbers, it will include 3 decimals (as you’ll want to account for the 2 decimal places following a number with 2 digits).

Let me know if the use of substring helps for your case