Forum Discussion
Cant use data fields in measure.
Hi guys, i am at a bit of a lose.
I cant use fields from an import table.
when creating a measure and i type the able name, it doesntt come up.
when I type the full name, it throws an error.
I added the fields to a table visual, and that works
i have cleareed the cashe.
reimported the table.
any ideas?
Hey IanCockcroft ,
Trying to reference a field from an imported table inside a measure, but Power BI is not recognizing it. Few things you can try:
Check Table and Column Visibility: Make sure the table and its columns are not hidden from the report view. Right-click the table in the Fields pane and choose "Unhide in report view" if needed.
Verify Table Relationships: If the table you are referencing does not have a relationship with the rest of your data model, DAX might not recognize it within a measure. Consider checking the relationship view to confirm.
Confirm You're Typing the Table Name Correctly: Power BI is case-insensitive, but sometimes naming issues or spaces can interfere. Try using square brackets or IntelliSense to assist:
'Business Unit'[CDM Activity Category]
Test with a Simple Measure: Try creating a basic measure that counts rows in the table to ensure Power BI can access it:
RowCountBU = COUNTROWS('Business Unit')If this works, the table is accessible, and the issue may lie in how the original measure is written.
Check for Import Issues or Caching Problems: Even if you’ve cleared the cache and reimported, it is worth doing a full refresh and restarting Power BI. Occasionally, changes do not take effect until then.
Try with SELECTEDVALUE() or VALUES(): If you're referencing slicer input or single selections, this can help:
SelectedCategory = SELECTEDVALUE('Business Unit'[CDM Activity Category])
If none of these work, there might be a deeper issue with the data model.
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
8 Replies
- lucadelicio
Impactful Individual
if you are trying to create a measure, use a MAX function to use a filed from a table.
- IanCockcroft
Post Patron
aaaaaaaaaaaaaahhhhhhhhhhhhhh. dont i feel dumb
Is a column i should create
thanks
- Nasif_Azam
Super User
Hey IanCockcroft ,
Trying to reference a field from an imported table inside a measure, but Power BI is not recognizing it. Few things you can try:
Check Table and Column Visibility: Make sure the table and its columns are not hidden from the report view. Right-click the table in the Fields pane and choose "Unhide in report view" if needed.
Verify Table Relationships: If the table you are referencing does not have a relationship with the rest of your data model, DAX might not recognize it within a measure. Consider checking the relationship view to confirm.
Confirm You're Typing the Table Name Correctly: Power BI is case-insensitive, but sometimes naming issues or spaces can interfere. Try using square brackets or IntelliSense to assist:
'Business Unit'[CDM Activity Category]
Test with a Simple Measure: Try creating a basic measure that counts rows in the table to ensure Power BI can access it:
RowCountBU = COUNTROWS('Business Unit')If this works, the table is accessible, and the issue may lie in how the original measure is written.
Check for Import Issues or Caching Problems: Even if you’ve cleared the cache and reimported, it is worth doing a full refresh and restarting Power BI. Occasionally, changes do not take effect until then.
Try with SELECTEDVALUE() or VALUES(): If you're referencing slicer input or single selections, this can help:
SelectedCategory = SELECTEDVALUE('Business Unit'[CDM Activity Category])
If none of these work, there might be a deeper issue with the data model.
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam - danextian
Super User
If you are referencing a field/column in a measure, you must aggregate it - MIN, MAX, SELECTEDVALUE, COUNT or SUM, AVERAGE if it is a number.
- v-saisrao-msft
Community Support
Hi IanCockcroft,
Please check the response from danextian Nasif_Azam, as it address the issue.
Below are the link for reference:
Measures in Power BI Desktop - Power BI | Microsoft Learn
Learn DAX basics in Power BI Desktop - Power BI | Microsoft Learn
If this post helps, then please consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- v-saisrao-msft
Community Support
Hi IanCockcroft,
I hope you had a chance to review the solution shared earlier. If it addressed your question, please consider accepting it as the solution — it helps others find answers more quickly.
If you're still facing the issue, feel free to reply, and we’ll be happy to assist further.Thank you.
- v-saisrao-msft
Community Support
Hi IanCockcroft,
checking in to see if your issue has been resolved. If the response provided was helpful, kindly mark it as the solution so that others with the same issue can benefit.
Please let us know if you still need assistance.Thank you.
- v-saisrao-msft
Community Support
Hi IanCockcroft,
We haven’t heard back from you in a while. If your issue has been resolved, Mark the relevant response as the solution to help fellow community members.
If you still need support, let us know if you still need assistance.Thank you.