Forum Discussion

Pallavi_m's avatar
Pallavi_m
Icon for Helper I rankHelper I
3 years ago
Solved

DAX not identifying the column names

Hi, When I'm writing a measure, it prompts CANNOT FIND NAME[COLUMN NAME].   For ex: If( 'category'[oil]='yes' ,'code1','code2')   the column ('category'[oil]) in above dax works for the previous...
  • Greg_Deckler's avatar
    3 years ago

    Pallavi_m When you reference a column in a measure, you have to use an aggregation like MAX, MIN, SUM, etc. Are you sure that you have previously created calculated columns (not measures) because with calculated columns you do not need the aggregation.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Pallavi_m ,

    Is [forecast] a measure or one field in the table? If it is a measure, please update the formula of measure as below and check if it can return the correct result...

    MeasureName = CALCULATE ( [forecast], FILTER ( 'Region', 'Region'[country] <> BLANK () ) )

    Otherwise, please update the formula of the measure as below:

    MeasureName = CALCULATE ( SUM([forecast]), FILTER ( 'Region', 'Region'[country] <> BLANK () ) )

    If the above one can't help you get the desired result, please provide some sample data in the table 'Region' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards