Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I wanted to substract CRE-DET exactly 8000-6000 but getting very strange wrong answers.
Here I am using formula
Solved! Go to Solution.
Hi @Analitika
You need to calculate CRE and DET separately. Add more conditions to the filter code of the calculation. Here I add DTE = 0 when calcualte CRE and add CRE = 0 when calcualte DET.
Substract =
VAR _CRE =
CALCULATE (
SUM ( x[CRE] ),
FILTER (
ALL ( x ),
x[ID] = MAX ( x[ID] )
&& x[OBJ_ID] = MAX ( x[OBJ_ID] )
&& x[DET] = 0
)
)
VAR _DET =
CALCULATE (
SUM ( x[DET] ),
FILTER (
ALL ( x ),
x[ID] = MAX ( x[ID] )
&& x[OBJ_ID] = MAX ( x[OBJ_ID] )
&& x[CRE] = 0
)
)
RETURN
_CRE - _DET
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika
You need to calculate CRE and DET separately. Add more conditions to the filter code of the calculation. Here I add DTE = 0 when calcualte CRE and add CRE = 0 when calcualte DET.
Substract =
VAR _CRE =
CALCULATE (
SUM ( x[CRE] ),
FILTER (
ALL ( x ),
x[ID] = MAX ( x[ID] )
&& x[OBJ_ID] = MAX ( x[OBJ_ID] )
&& x[DET] = 0
)
)
VAR _DET =
CALCULATE (
SUM ( x[DET] ),
FILTER (
ALL ( x ),
x[ID] = MAX ( x[ID] )
&& x[OBJ_ID] = MAX ( x[OBJ_ID] )
&& x[CRE] = 0
)
)
RETURN
_CRE - _DET
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
88 | |
63 |