Forum Discussion
firstnonblank issue
Hello,
Sorry for the question, I know it's a bit basic, but I'm a bit blocked...
i have this measure :
CALCULATE (
FIRSTNONBLANK ( INC[U_END], 1 ),
FILTER (
'INC',
'INC'[PROB_ID] = PROB[NUMBER_ID]
)
)it work fine, but I now want to do the same logic for a column that always has a value or "false" or "true". The same measure but instead of the column U_END ... the column i want know.... dont have blank values ....
Can anyone help me ?
Best Regards,
JO
Hi Anonymous ,
If there are Unique IDs for [PROBLEM_ID] or [NUMBER_ID], this error message will be thrown. So the LOOKUPVALUE function is not suitable for this scenario. While the FIRSTNONBLANK function in the scenario which is equivalent to the LOOKUPVALUE will be Ok. If you need to show the blank value, you can create column but not a measure using the DAX below.
Column 1= CALCULATE ( FIRSTNONBLANK ( 'INC_PROD'[CAUSED_BY], 1 ), FILTER ( 'INC_PROD', 'INC_PROD'[PROBLEM_ID]= 'PROB_PROD'[NUMBER_ID]))
Best Regards,
Amy
12 Replies
- v-xicaiCommunity Support
Hi Anonymous ,
Would you like to create measure using the FIRSTNONBLANK ? Then try the following formula. Or could you please share your sample data or desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
CALCULATE ( FIRSTNONBLANK ( INC[Boolean column], 1 ), FILTER ( 'INC', 'INC'[PROB_ID] = MAX(PROB[NUMBER_ID] )) )
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hello,
I have a two tables:
Table A (number_id, prob_id, caused)
Table B (number_id)
Table A (prob_id) = Table B (number_id)
what i want is to put in the Table B the column caused from Table A, and if the column caused have empty values i want the empty field in Table B to.
Can you help me ?
i can´t share my data, sorry for that
Best Regards,
JO
- v-xicaiCommunity Support
Hi Anonymous ,
>>what i want is to put in the Table B the column caused from Table A, and if the column caused have empty values i want the empty field in Table B to.
1.Woud you like to create a column or a measure?
2.When the Table A[Caused] have empty value, the Table B 's new created column or measure will be empty too, right? I am not sure what desired result would you want, could you please share your sample data or desired output in screenshots for further analysis? Do mask sensitive data before uploading.
Best Regards,
Amy