Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cannot reference a non numeric measure in DAX from another Power BI dataset

Hi team,

I connected with company sever via getting data from "PBI datasets". But when I create new measures, I find that I can only reference numeric fileds from that dataset. Non-numeric fileds cannot be found when I try to reference them (but they are indeed in the fileds of that dataset).

 

May you please help?

 

Thank you.

 

Mia1111_0-1664353233631.pngMia1111_1-1664353388558.png

 

Best Regards,

Mia

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

It is not valid to reference a column in an IF function in a measure like that. This is why the PROD_STATUS_CODE is not showing. It has nothing to do with the data type. 

 

If you did something like COUNTROWS( FILTER( Query1, Query1[PROD_STATUS_CODE] = "XXX" )) it should work. If you can explain a bit more about what you are trying to calculate we can probably explain how to achieve the result you are after.

View solution in original post

3 REPLIES 3
d_gosbell
Super User
Super User

It is not valid to reference a column in an IF function in a measure like that. This is why the PROD_STATUS_CODE is not showing. It has nothing to do with the data type. 

 

If you did something like COUNTROWS( FILTER( Query1, Query1[PROD_STATUS_CODE] = "XXX" )) it should work. If you can explain a bit more about what you are trying to calculate we can probably explain how to achieve the result you are after.

Anonymous
Not applicable

Thanks for your help! I am trying implement something like "SUMIF" in excel. E.g. I would like to create a measure "OPEN sales" to calculate the total sales amount whose STATUS_CODE is "OPEN".

Mia1111_0-1665217542361.png

 

v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

According to your description, if you want to create some new measure based on the dataset, you can download this pbix file (if you have the appropriate permissions) and develop it later.

 

However, there are some restrictions that need to be noted, as described in the following document.

Download a report from the Power BI service to Power BI Desktop - Power BI | Microsoft Learn


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.