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
WINDOW_SUM(sum(column A) * sum (column B)/WINDOW_SUM(column A) ])
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 ?
WINDOW_SUM( SUM( [col-A]*[col-B])) / WINDOW_SUM(SUM([col-A]))