There's no function to get the chart type but you might be able to do what you want using the function secondarydimensionality().
From the helpfile: "The secondarydimensionality() function always returns 0 when used outside of pivot tables.
So, in your expression, you could write: if(secondarydimensionality()=0, straighTableExpr, pivotTableExpr)
Haven't tested it but it should work.
That works, thanks! But now let me add a little complexity curve to it. How about I would like to view the same as a YTD, PYTD, Variance for rolling averages?
i.e. the expression is rangesum(before(sum(salesamount), 0, 3))
the before function fails because it isn't a trend table anymore but more so, the pivot table is just plain blank despite using secondarydimensionality()
any ideas? thanks again.