Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Comparing values of type text to integer

Hi,

 

Although I have heard of this error "You cannot compare values of type text to integer" a lot of times before, Im still not able to figure out what conversion I need to make with my below calculation. Please help

 

 

Calculated Column =
VAR id1 = [Feature ID]
RETURN
    IF (
        [Executed Flag] = 1,
        IF (
            CALCULATE (
                COUNTROWS ( 'Table' ),
                'Table'[Feature ID] = id1,
                'Table'[202/3 Flag] = 1
            ) = 2,
            IF (
                CALCULATE (
                    COUNTROWS ( 'Table' ),
                    'Table'[Feature ID] = id1,
                    'Table'[User Story Status] = "Complete or Closed"
                ) = 2,
                "Workshop Complete",
                "Workshop Executed but not Completed"
            ),
            "Workshop Executed but not Completed"
        ),
        "Not Executed"
    )

 

 

  • Hi Anonymous 

    Your [202/3 Flag]column was Text and it needed to be Whole Number type.

    I've changed it and now your Calculated Column code works.

    Download the PBIX

    Regards

    Phil

7 Replies