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 have main measure which produce wrong total if m_SSA_3 measure is changed
m_SSA =
VAR Sum1 = [m_SSA_1] - [m_SSA_2]
VAR Sum2 = [m_SSA_3] - [m_SSA_4]
RETURN
SWITCH(TRUE(),
"IAT" in distinct ( Table2[SK/AV] ) ,
Sum2,
"GIA" in distinct ( Table2[SK/AV]),
Sum1
)
if m_SSA_3 measure is changed from this
m_SSA_3 =
VAR valText1 = "$PRD"
VAR valText12 = "$PR.L"
VAR Result =CALCULATE ( .... huge countings)
RETURN
SWITCH(TRUE(),
"IAT" in distinct ( Table2[SK/AV] ) ,
-Result,
"GIA" in distinct ( Table2[SK/AV]),
Result
)
to this
m_SSA_3 =
VAR valText1 = "$PRD"
VAR valText12 = "$PR.L"
VAR Result =CALCULATE ( .... huge countings)
VAR discount =
IF (
"PR" IN DISTINCT ( Table1[rus_kod] )|| "NU" IN DISTINCT ( Table1[rus_kod] ), Result, -Result
)
RETURN
SWITCH(TRUE(),
"IAT" in distinct ( Table2[SK/AV] ) ,
discount,
"GIA" in distinct ( Table2[SK/AV]),
Result
)
Solved! Go to Solution.
@Analitika , this happens when you use switch or if. refer filter . Of have formula like
new m_SSA_3 = sumx(values(Table[_MN]),[m_SSA_3])
Or move switch calculation inside sumx or countx
@Analitika , this happens when you use switch or if. refer filter . Of have formula like
new m_SSA_3 = sumx(values(Table[_MN]),[m_SSA_3])
Or move switch calculation inside sumx or countx
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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |