Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible metadata mismatch? #566

Closed
ImkeF opened this issue Aug 12, 2020 · 5 comments
Closed

possible metadata mismatch? #566

ImkeF opened this issue Aug 12, 2020 · 5 comments

Comments

@ImkeF
Copy link

ImkeF commented Aug 12, 2020

I'm missing annotations for a model in the newest TE version (2.11.7).
They are simply not visible.

Also, when opening the workbook with a newer version of Power BI all the format strings that had been applied through TE will get lost. Turns out that the application of the format strings in TE had set the format-fields in the annotations to "Text".
As those measure formats were number formats, a possible mismatch would probably have caused them to be dropped, I could imagine. (my version is 2.83.5894.881 and the delinquent version is 2.83.5894.961 )

Format strings are greyed out subsequently in the UI of PBI.

Anything that can be done about this?
Thanks!

@otykier
Copy link
Collaborator

otykier commented Aug 12, 2020

In general, Tabular Editor does not touch the annotations on objects. Do you have calc groups in your model? I noticed that the data type on measures can sometimes change to “Variant” depending on the complexity of calc group calculations. If this happens, I’m afraid PBI Desktop has an issue where it treats all measures as Text, which would explain the annotation (since this annotation is entirely controlled by PBI).

You may be able to enforce the format string set in Tabular Editor by removing all these annotations from your model. You can do this easily using a script in TE:

foreach(var m in Model.AllMeasures)
{
    m.RemoveAnnotation("Format");
}

Kindly let me know if this helps.

@ImkeF
Copy link
Author

ImkeF commented Aug 12, 2020

Thanks, you're a saviour ;)
Variants they are, indeed.

@otykier
Copy link
Collaborator

otykier commented Aug 12, 2020

Regarding annotations not being visible - try to put a checkmark in "Allow unsupported Power BI features" under File > Preferences. In general, annotations put in place by Microsoft's own tools (SSDT, PBI Desktop, etc.) are not documented anywhere, so naturally, making changes to these may cause unsupported/undefined behavior, etc., so use at your own risk. However, the format string thing is definitely a bug within Power BI's handling of the Variant data types - I will raise it with the product team to make sure it gets addressed.

@ImkeF
Copy link
Author

ImkeF commented Aug 12, 2020

Thanks Daniel,
will test this out later on a sample file. But as long as working with customer files, I won't go the unsupported route.
Thanks for flagging it to the team!

@otykier otykier closed this as completed Aug 19, 2020
@otykier
Copy link
Collaborator

otykier commented Aug 24, 2020

Heads up: 2.12.0 now ensures that all the numeric format string options are still displayed, even if measures have decayed to the Variant data type (where as previously, you could only set a custom format string in Tabular Editor). This doesn't fix the issue on the Power BI Desktop side, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants