Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: How to calculate a percentage based on values on a cross-tab report?

$
0
0

Hi Nimish,

 

I think I know why that's happening.

 

Replace the existing formula under Display String with this code:

 

local stringvar n := strreverse(GridLabelAt("@acct distinct count",CurrentRowIndex));

local numbervar i;

for i := 1 to len(n) do

(

    If isnumeric(n[i]) then

        local stringvar ns := ns & n[i]

    else

    (

    exit for;

    '';

    )

);

If NOT isnumeric(ns) OR tonumber(strreverse(ns)) = 0 then '0 %'

Else

Totext(GridValueAt(CurrentRowIndex, CurrentColumnIndex, CurrentSummaryIndex-1) % tonumber(strreverse(ns))) & ' %';

 

-Abhilash


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>