on 01-29-2018 2:46 PM
Hi Experts,
I have a Crosstab which has three dimensions as rows and two measures as columns.
Column A : Total no. of employees
Column B : Percentage of employees.
The requirement from the business is to show “%” sign along with the Percentage value e.g. Column B values like 64.3%.
In order to show the % sign, I have used the following script in my CSS
.X .sapzencrosstab-DataArea>tbody>tr:nth-child(1)>td:nth-child(1):after{
content:"%";
}
With this script, % sign is displayed along with the value but after the value like
64.3
%
What should I change in the script to show “%” sign along with the value.
I am using SAP Design studio 16.5.0.
Any help will be greatly appreciated!!
Thanks!!
Can you look at /try Vidya's post? https://blogs.sap.com/2016/12/08/format-your-own-symbol-in-the-crosstab-using-css-sap-design-studio-...
CSS looks similar, but a "before" where you have "after"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tammy,
Thanks for your reply. The solution worked!!. But I did a small change in my CSS. writing it here, may be useful for someone in future.
.crosstabpercent .sapzencrosstab-DataArea>tbody>tr>td:nth-child(even).sapzencrosstab-DataCellDefault>div:after {
content: "%";
}
My crosstab, for some dimensions has a value and for some dimension has a blank. The problem is, with values I want to show % sign while with blanks nothing. Right now with the above code, it’s showing “%” sign even with blanks. Is there a workaround to put “%” sign conditionally ?
Many thanks!!
Make a small change in your CSS as below:
.X .sapzencrosstab-DataArea>tbody>tr:nth-child(1)>td:nth-child(1) div::after{
content:"%";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arjit,
Thanks for replying to me.
Here is the thread as already raised for help.
https://answers.sap.com/questions/565031/displaying-percentage-symbol-in-combination-charts.html
could you please look into and help me on this please.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.