Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I need help fixing this error please, I am not summing any strings
Error Message:
MdxScript(Model) (8, 274) Calculation error in measure 'Sheet5'[Total Cost]: The function SUMX cannot work with values of type String. Attached file has all my formulas
Please see link to Pbfile here
Solved! Go to Solution.
Hi @moeconsult ,
Modify the measure like this:
Total Cost =
VAR x = [Course Duration]*([Facilitator Fee]+[Venue Fee]+[Facilitator Fee])
RETURN
IF(
HASONEVALUE('Sheet5'[StartDate]),
x,
SUMX(
SUMMARIZE(
'Sheet5',
'Sheet5'[StartDate],'Sheet5'[CourseName],
"ABCD", x
),
[ABCD]
)
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @moeconsult ,
Modify the measure like this:
Total Cost =
VAR x = [Course Duration]*([Facilitator Fee]+[Venue Fee]+[Facilitator Fee])
RETURN
IF(
HASONEVALUE('Sheet5'[StartDate]),
x,
SUMX(
SUMMARIZE(
'Sheet5',
'Sheet5'[StartDate],'Sheet5'[CourseName],
"ABCD", x
),
[ABCD]
)
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check data Type. Seems like it is text. Try to change it to number
User | Count |
---|---|
101 | |
90 | |
80 | |
71 | |
69 |
User | Count |
---|---|
114 | |
97 | |
97 | |
73 | |
72 |