I wrote a calculation group C# script so that you don’t have to …
What is a calculation group?
Have you ever been in the situation where you had to create a profit and loss statement with an actual and budget calculation and then show the output on current, year-to-date, full-year and compared to last-year level? Creating this requires a lot of measures.
With calculation groups you can group calculations items, which are basically pre-defined measures. For example: Calculate ( Selectedmeasure () , DatesYtd ( ‘Date_table’ [ Datum ‘ ) )
The beauty of a calculation item is in the function ’Selectedmeasure ()’. This function looks at all the measures in context. It will then replace ‘SelectedMeasure ()’ by the measure in context.
By grouping calculation items, one measure (calculation item) can be created for multiple measures. This significantly reduce the number of redundant measures.
Run the C# Script with Tabular Editor 2!


