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

Error Exporting Metrics - DaxStudio 2.9.4 #218

Closed
denglishbi opened this issue Sep 19, 2019 · 6 comments
Closed

Error Exporting Metrics - DaxStudio 2.9.4 #218

denglishbi opened this issue Sep 19, 2019 · 6 comments
Assignees

Comments

@denglishbi
Copy link

@denglishbi denglishbi commented Sep 19, 2019

Wanted to export metrics to import into new Vertipaq Analyzer 2.0, but received the following message:

Error exporting metrics: Query (1, 100) Too few arguments were passed to the UNION function. The minimum argument count for the function is 2.

@dgosbell

This comment has been minimized.

Copy link
Contributor

@dgosbell dgosbell commented Sep 19, 2019

I think I found this issue. Vertipaq-Analyzer is using a pattern like the following to get the column cardinality
EVALUATE UNION( ROW( <columnname>, DISTINCTCOUNT( <columnname>) , ...
but it is also calling this in batches of 50 columns at a time... So if you had 51 or 101 or 151 etc columns in your model I think the last batch will fail with this error.

Are you able to check if the number of columns in your model is a multiple of 50 , plus 1 ?

The row count from the following query should give you this.

select *
from $system.TMSCHEMA_COLUMNS
where State = 1
@marcosqlbi

This comment has been minimized.

Copy link
Contributor

@marcosqlbi marcosqlbi commented Sep 19, 2019

Thanks for catching this! I'll work on a fix soon.

@dgosbell

This comment has been minimized.

Copy link
Contributor

@dgosbell dgosbell commented Sep 19, 2019

@marcosqlbi - I just pushed a potential fix for this to the VPA repo which checks the batch size before wrapping the ROW() call with UNION() :)

@marcosqlbi

This comment has been minimized.

Copy link
Contributor

@marcosqlbi marcosqlbi commented Sep 19, 2019

Great - thanks!

@denglishbi

This comment has been minimized.

Copy link
Author

@denglishbi denglishbi commented Sep 20, 2019

Yes, the query returned 201 rows:)

@dgosbell dgosbell self-assigned this Sep 26, 2019
@dgosbell dgosbell added the bug label Sep 26, 2019
@dgosbell

This comment has been minimized.

Copy link
Contributor

@dgosbell dgosbell commented Dec 20, 2019

This should now be fixed in the 2.10 release

@dgosbell dgosbell closed this Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.