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

Bravo\ManageDates - multiple values supplied, single value expected #30

Open
albertospelta opened this issue Nov 14, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@albertospelta
Copy link
Collaborator

Query (601, 43) A table of multiple values was supplied where a single value was expected.

Repro steps:

  • add a new Date/Time calculated column where the expression uses the TIME function
  • open Bravo\ManageDates and enable the creation of the holidays table in the model

image

Sample PBIX file

DaxTemplateIssue.zip

@albertospelta albertospelta added the bug Something isn't working label Nov 14, 2022
@marcosqlbi
Copy link
Collaborator

The issue is that the column with TIME generates a date in 1900 and the table generated for the holidays is correct, but LOOKUPVALUE generates an error comparing dates that are before 1908. Thus, it seems we have to move the generation of holidays from 1908 even when dates in the model are earlier than that. We should also ignore columns marked as TIME in the attributes for Power BI. I will fix the DaxTemplate library as this might require changes in the code and not only in the template files. The current workaround in this case is to specify First Year and Last Year in the parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants