For calculation levels PRE_FILTER and PRE_AGG, the operands can't be aggregated

I have 2 dimensions and 2 numeric values in the dataset .
Category and subcategory are my dimensions.
Sales and Profit are numeric values.

I created a calculation Profit Ratio = Sum(Sales)/Sum(Profit)

Now have a profit Ratio for each Category and It’s Sub Category.

My requirement is to Find the maximum and minimum Profit Ratio within all categories and its subcategory and display them on a Normal Table .(Not in a KPI)

Calculation I wrote is working fine when I am Dragging Category and Subcategory to the Table. I want the calculation to work when Category and subcategory fields are not present in Table, Neither I want to Hide or filter any field.

MaxProfitRatio = Maxover(ProfitRatio,)

I am trying to see 38.11(one row) output in the Table, without dragging subcategory or category in the Table.

Hi @Vivek54, you can use LAC-A functions to get the max. I have used Region and SubRegion in below example. If this helps resolve your issue, please mark this as solution.

Table with Region and Subregion

Table without any dimension

LAC-A Calculation

Regards,
Karthik

2 Likes

Thanks Karthik. Issue resolved.

1 Like