Hi All,
I am trying to calculate a custom grand total in tableau for the below mentioned fields. Consider we have Columns a, b and the calculation should be like
column A * column B at row level and window sum of this value / Window sum of column A. I tried using the below mentioned way
if size() >1
then
MAX(column A)
ELSE
WINDOW_SUM(sum(column A) * sum (column B)/WINDOW_SUM(column A) ])
END
But getting the incorrect result which is same as the output of below mentioned calculation.
Window_sum (column A) * window_sum(column B)
Can anyone help me on this ?
Thanks,
Ganesan k.
WINDOW_SUM( SUM( [col-A]*[col-B])) / WINDOW_SUM(SUM([col-A]))
Become a Viz Whiz on the Forums!
Support the Community and master Tableau.