Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a single measure that displays either the sum of sales in dollars, or in units depending on which value is selected in a slicer.
YTD Total = SWITCH([Selected Unit],
"Quantity", CALCULATE(SUM(Quantity), DATESBETWEEN(Date, YearStart, Today)),
"Dollars", CALCULATE(FORMAT(SUM(Dollars), "Currency"), DATESBETWEEN(Date, YearStart, Today)))
This measure iself works just fine, but it is used in another measure "YOY Percent Change"
YOY Percent Change = [YTD Total] / [Prior YTD Total]
Where "Prior YTD Total" is a measure similar to "YTD Total".
This measure also works fine in a table, but when placed into a matrix which has "region" in the rows. I get the following error:
"MdxScript(Model) (270,62) Calculation error in measure "YTD Total" Cannot convert value " of type Text to type Numeric."
Thanks for any help on this relatively complex issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.