Measure for Difference in Same Column From Filter

lac0403

Board Regular
Joined
Apr 25, 2008
Messages
50
I have a Cost file in my data model that has costs in it for different times - Last Year, This Year. I have a measure

Power Query:
Difference Last Year - This Year = Calculate (Sum ('Cost File'[Last Year],'Cost File'[Period] in {"Last Year"})-Calculate (Sum ('Cost File'[Last Year],'Cost File'[Period] in {"This Year"})

The measure calculates fine in the pivot table, the problem is I want to see Last Year, This Year, and the Difference columns. But in the pivot, it shows the Difference column twice.

Screenshot (1).png




I am just learning DAX. I think I need more in the measure DAX code, but do not know it well enough. (And all reference is online.) Any assistance is appreciated.

Using Excel O365 Desktop / Power BI Desktop for the power query & data.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,360
Messages
6,124,489
Members
449,166
Latest member
hokjock

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top