Calculation Groups

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!

Sharing is caring!

Twitter
LinkedIn
WhatsApp
Email
Threads

Have a look at my other blogs

ISFILTERED

You probably know that the ISFILTERED function returns TRUE when the specified table or column is being filtered directly. But did you know that if you add multiple ISFILTEREDs together, ISFILTERED will not return true or false, but will return a number. You can combine this returned number with a switch function to influence your total levels.

Read More ...

Un-Bold Row Headers

Have you ever created a matrix visual, with hierarchy, where your row headers are formatted 𝐛𝐨𝐥𝐝? You can not seem to turn if off, because

Read More ...

Alignment of visuals

Have you ever heard of the “Align” button? It helps you to align visuals, no more precision drag-and-drop…

It also helps to distribute visuals horizontally of vertically over a canvas. This will give an overall alignment of visuals which would make your report so much cleaner.

Read More ...

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading