Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX problem after changing data source

I have the following DAX code in my PBI file. I have only changed the data sources from .xlsx files to .csv files. All the data and datatypes are identical. After changing the data sources though, this code gives me an error:

 

 

MAX_User = 
CALCULATE(
    MAXX(
        ALLSELECTED('CALC NP''s (Unique)'),
        'CALC NP''s (Unique)'[User]
    ),

    GROUPBY(
        'CALC NP''s (Unique)', 
        Date[Week],
        'CALC NP''s (Unique)'[Patiƫntnumber]
    )
)

 

 

For 'Date[Week]' it now suddenly says 'Parameter is not the correct type'. Does anyone have an idea of why this is? 

  • Anonymous , Check your relationships. I think that has broken, It may happen when changes sources from one type to another

2 Replies

  • Anonymous , Check your relationships. I think that has broken, It may happen when changes sources from one type to another

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much! The relationship was indeed broken for some reason.