Forum Discussion

Oggie's avatar
Oggie
Frequent Visitor
1 year ago

Nesting of Calculation groups or Calculation Group items with measures

Hi! I desperately need your help with calculation groups... I am trying to get to the following result with nested calculation groups but am stuck... 

I have created two calculation groups that gives me the correct values as follows in a Matrix:

I now want to nest the Rows into the columns to be able to show products on rows instead, like the picture above. How should I resolve that?

 

The rows are parts of a calculation groups with links to measures with the following code:

Revenue (Local Curr) = CALCULATE(sum(fact_ledger_entry[amount]),dim_internal_statement_row[level1_id]="300"
Volumes (# Sold tires) = CALCULATE(sum(fact_ledger_entry[quantity]), dim_internal_statement_row[level1_id]="300")
 
The columns are also part of a calculation group but with the code written directly in the calculation item as follows:

MTD Act = CALCULATE( TOTALMTD( SELECTEDMEASURE(), dim_fiscal_calendar[ledger_date]), fact_ledger_entry[ledger_kind] = "ActualBilling", fact_ledger_entry[source.fiscal_period_index] <> 0 )

MTD Act PY = CALCULATE( TOTALMTD (selectedmeasure(), sameperiodlastyear(dim_fiscal_calendar[ledger_date])) ,fact_ledger_entry[ledger_kind]="ActualBilling")

I am using the following measure as "VAlues" in the matrix 
AmountSum = sum(fact_ledger_entry[amount])

Hope you can help!! 
All the best