Quantcast
Viewing all articles
Browse latest Browse all 2697

Advance with Assist: A Shortcut for Duplicating Calculations

Image may be NSFW.
Clik here to view.

Question: I’m needing to split Sales out for each member of a dimension to have separate measures. What’s the best way to go about that?

This question comes up from time to time when someone has a dimension that separates out a single measure, but the desired analysis and report layout needs a separate measure. Using Superstore, let’s say you want the Sales for each Segment. You’d create a calculated field with the logic below:

Image may be NSFW.
Clik here to view.

Now, to create the other two, since Superstore has Consumer, Home Office and Corporate Segments, you may go over to your Data pane and right-click the field, select Duplicate, and change the name and calculation for the next calculation. I know I’ve done this before:

Image may be NSFW.
Clik here to view.

Streamline Duplicate Calculations

But did you know that you can do all three from a single calculated field editor? Here’s how. Start by creating the above calculated field again, but this time, put all three in the editor. Separate each with commenting in the calculation. For example:  // Consumer Sales 

Your editor will now look like this:

Image may be NSFW.
Clik here to view.

Now here’s where this gets fun. Highlight the first comment and calculation, click the highlighted section and then drag it to your Data pane. Then you instantly have a named calculation with the logic you pulled over:

Image may be NSFW.
Clik here to view.

No more duplicating, renaming copies, etc. Just duplicate the logic you need, pull it over, and you instantly have your calculation!

The post Advance with Assist: A Shortcut for Duplicating Calculations appeared first on InterWorks.


Viewing all articles
Browse latest Browse all 2697

Trending Articles