TabularEditor / TabularEditor3

Bug reports, feature requests, discussion and documentation for Tabular Editor 3 (commercial version).
61 stars 7 forks source link

[Issue] the column xxx resulted in a variant data type! #942

Open hzykelvin opened 10 months ago

hzykelvin commented 10 months ago

Describe the issue

Error message occur: the column xxx resulted in a variant data type!

But the column xxx is right in the model.

Which version are you currently using? Tabular Editor 3, version: 3.8.0.18402 Tabular Editor 3 edition: desktop

To Reproduce Are you connected to SSAS/AAS/Power BI or working offline? Powerbi

otykier commented 10 months ago

Hi @hzykelvin Could you share the DAX expression of the calculated column?

Also, try to set the "Data Type Inferred" property to "false" and explicitly set the "Data Type" property to the expected type.

image
hzykelvin commented 10 months ago

Hi @hzykelvin Could you share the DAX expression of the calculated column?

Also, try to set the "Data Type Inferred" property to "false" and explicitly set the "Data Type" property to the expected type.

image

i created a calculated column [aaa] in table A。the calculation column use switch(...) . and then i created a calculated table use summarize(table A, xxx, xxx, ... [aaa] ) . then show the message:" the column [aaa] resulted in a variant data type, which is not allowed on a calculated table."

hzykelvin commented 10 months ago

It's strange. I have already set The calculated column's type as string in powerbi desktop, but the type of the calculated column is variant in tabular editor 3.

otykier commented 10 months ago

@hzykelvin Tabular Editor 3 has its own DAX parser. There could be a bug in this parser, which causes it to detect that the result of a DAX expression is variant, where in reality it is something else. To help us identify the issue in this case, it would be helpful if you could share the full DAX expression of the calculated column that uses switch(...). If you're not comfortable sharing it here, please send an e-mail to support@tabulareditor.com, referring this issue #942.