Forum Discussion
Cannot reference a non numeric measure in DAX from another Power BI dataset
- 3 years ago
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.
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.
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".