Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi
I have 2 columns that i would like to subtract from one another after applied filters.
Eg.
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?
Hi @EMSSS22
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?
Hi
Yes its the same table.
and
Yes the same filter needs to be applied to both columns.
Thanks 🙂
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
ForecastCMVariance =
CALCULATE (
SUMX (
FilteredCommercial,
FilteredCommercial[Forecast] - FilteredCommercial[Capital Rental]
),
FilteredCommercial[Version] = "x",
FilteredCommercial[month number] = y
)
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
16 | |
13 | |
10 | |
8 |
User | Count |
---|---|
59 | |
20 | |
12 | |
11 | |
10 |