I have 2 columns that i would like to subtract from one another after applied filters.
Column B (with version type x and month number x) - Column A (with version type x and month number x)
What I currently have and is giving me wrong answer:
How do I go about writing this dax?
Are version type and month number from the same table or different tables? What are the relationship between the tables? When you refer to "x" is it the same value used to filter both columns?
Yes its the same table.
Yes the same filter needs to be applied to both columns.
Apologies for the late reply. Please try
ForecastCMVariance =SUMX (FILTER ( Commercial, Commercial[Version] = "x" && Commercial[month number] = y ),Commercial[Forecast] - Commercial[Capital Rental])
Try something like
FilteredCommercial[Forecast] - FilteredCommercial[Capital Rental]
FilteredCommercial[Version] = "x",
FilteredCommercial[month number] = y
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.