Forum Discussion
johnsboxftm
Apr 01, 2023Brass Contributor
Fill Handle Not Working. Is there a better way to do this?
Hi all, I am calculating Sales Variances from month to month and previous year. I already used a pivot table to gather the information. I would have liked to have had the dollar amount and its ...
NikolinoDE
Apr 02, 2023Platinum Contributor
To create a custom measure in Power Pivot, you need to use the Data Analysis Expressions (DAX) formula language.
Here’s an example of how you can create a custom measure that concatenates the dollar amount variance and its percentage variance into a single text string:
- Open the Power Pivot window by clicking on the “Power Pivot” tab in the ribbon and selecting “Manage”.
- In the Power Pivot window, select the table where you want to create the custom measure.
- Click on the “Measure” button in the “Calculations” group of the “Home” tab.
- In the formula bar, enter a DAX formula that calculates the dollar amount variance and its percentage variance and concatenates them into a single text string.
For example:
Variance = FORMAT([Sales]-[Last Month],"$#,##0") & " (" & FORMAT(([Sales]-[Last Month])/[Last Month],"0.0%") & ")".
Make sure to replace [Sales] and [Last Month] with the appropriate measure names for your data.
- Press Enter to save the measure.
You can now add this custom measure to your Power Pivot table to display both the dollar amount variance and its percentage variance in the same cell.
I hope this helps!