Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sohan
Helper III
Helper III

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? 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.