Forum Discussion

Dunner2020's avatar
Dunner2020
Post Prodigy
6 years ago
Solved

value can not be determined error

Hi there,

 

I am trying to create measure for the legend for map. I read following statement to calculate the measure.

 

RANGES = Sheet1[ SWITCH(TRUE(),AND(Sheet1[Confimred Cases]>=0,Sheet1[Confimred Cases]<10),"0 to 9",AND(Sheet1[Confimred Cases]>=10,Sheet1[Confimred Cases]<50),"10 to 49",Sheet1[Confimred Cases]>=50,"50 and more")
 
However, got the following error:
"The value for 'Confimred Cases' cannot be determined. Either 'Confimred Cases' doesn't exist, or there is no current row for a column named 'Confimred Cases'."
 
Could anyone help me how to fix the issue?
 
Here is the snap shot of workspace:
 
 
  • v-lid-msft's avatar
    v-lid-msft
    6 years ago

    Hi Dunner2020 ,

     

    We can try to use the following measure to meet your reqirement:

     

    RANGES =
    SWITCH (
        TRUE (),
        AND (
            SUM ( Sheet1[Confirmed_Cases] ) >= 0,
            SUM ( Sheet1[Confimred_Cases] ) < 10
        ), "0 to 9",
        AND (
            SUM ( Sheet1[Confimred_Cases] ) >= 10,
            SUM ( Sheet1[Confimred_Cases] ) < 50
        ), "10 to 49",
        SUM ( Sheet1[Confimred_Cases] ) >= 50, "50 and more"
    )

     


    Best regards,

     

4 Replies

  • edhans's avatar
    edhans
    Community Champion

    Can you make sure the column name doesn't have a trailing space(s)?

    If you are doing a measure, you must specify the table before the column. Just putting [Confirmed Cases] in a measure it is expecting another measure being referenced. That is ok in a Calculated Column though as everything is the current table.

    • Dunner2020's avatar
      Dunner2020
      Post Prodigy

      Hi edhans,

       

      I have removed the sapaces from the column name and also put the table name, but no luck. Here is the updated snippet code:

       

       

      RANGES = SWITCH(TRUE(),AND(Sheet1[Confirmed_Cases]>=0,Sheet1[Confimred_Cases]<10),"0 to 9",AND(Sheet1[Confimred_Cases]>=10,Sheet1[Confimred_Cases]<50),"10 to 49",Sheet1[Confimred_Cases]>=50,"50 and more")
      • v-lid-msft's avatar
        v-lid-msft
        Community Support

        Hi Dunner2020 ,

         

        We can try to use the following measure to meet your reqirement:

         

        RANGES =
        SWITCH (
            TRUE (),
            AND (
                SUM ( Sheet1[Confirmed_Cases] ) >= 0,
                SUM ( Sheet1[Confimred_Cases] ) < 10
            ), "0 to 9",
            AND (
                SUM ( Sheet1[Confimred_Cases] ) >= 10,
                SUM ( Sheet1[Confimred_Cases] ) < 50
            ), "10 to 49",
            SUM ( Sheet1[Confimred_Cases] ) >= 50, "50 and more"
        )

         


        Best regards,