Forum Discussion
firstnonblank issue
- 7 years ago
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
Hi,
Thanks for your quick reply :smileyhappy:
sorry again, but i can´t show any data, because are sensitive and privileged information
But what i want is show in a table the number_id from Table B and the cause that is related (Table A caused) to that number_id (if there is no information I want the field to appear blank).
it is possible to this in a measure ? if it is, i perfer in a measure, but if is not possible i can create a new colomun in table B is not a problem.
Thank you again for your help, very grateful :smileyhappy:
Best Regards,
JO
Hi Anonymous ,
So your demand is lookup the matched TableA[prob_id] based on the filter TableA[prob_id]=TableB[number_id], if not exist , return the blank, right? If yes, you can try the measure below.
Measure1 = IF(ISBLANK(LOOKUPVALUE(TableA[caused],TableA[prob_id],MAX(TableB[number_id]))),
BLANK(),
LOOKUPVALUE(TableA[caused],TableA[prob_id],MAX(TableB[number_id])))
Best Regards,
Amy