The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 previously written measures, but now when I want to use the same column and write another measure. It's prompting "CANNOT FIND NAME[COLUMN NAME]"
This is happening with other columns and tables too.
Why is this suddenly happening?
Please help me.
Solved! Go to Solution.
@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.
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
@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.
its a text column...
if( table[textcolumn] = "A", "---")
but this text column not recognized by dax,
I'm trying to use a filter in calculate function, and it says CANNOT FIND NAME[COLUMN NAME]
where I've used the same filter previously for other measure and they are working fine in the page/report.
hi @Pallavi_m
If there is row context, we can use table[col] like values. A row contex exist in calculated columns or iterators (like X-functions).
If not, it will end an error.
Do you have a row context for this code?
If( 'category'[oil]='yes' ,'code1','code2')
You say it worked previously, can you also share the previous code?
calculate([forecast],'Region'[country] <>blank())
when I'm trying to use the region[country] filter , it says cannot find
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