Forum Discussion
Anonymous
5 years agoNot applicable
IFERROR
Hi All, I am trying to use the IFERROR in DAX. This is the formula I have used for Recommended Daily Usage Type. Recommended Daily Usage Type = IFERROR(LOOKUPVALUE('Daily Usage Type'[Pr...
- 5 years ago
Hey Anonymous ,
then that's not an error. You can check if it's blank to return the Usage Type and otherwise the lookup value.
Try the following measure:
Recommended Daily Usage Type = VAR vLookupValue = LOOKUPVALUE( 'Daily Usage Type'[Proposed Daily Usage], 'Daily Usage Type'[PartPlantbyYearWeekNum], 'Master Data Hygiene (2)'[PartPlantbyYearWeekNum] ) RETURN IF( vLookupValue = BLANK(), 'Master Data Hygiene (2)'[Daily Usage Type], vLookupValue )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Anonymous
5 years agoNot applicable
Hi selimovd ,
Thank you!
Yes. For some PartPlantbyYearWeekNum, the Proposed Daily usage type is blank. i.e., Daily Usage Type'[Proposed Daily Usage] is blank.
And hence, for the blank rows, I want the same values to be copied in Daily Usage type.
For eg: In the image above, In 3rd row, Recommended Daily usage is blank. So, I want it be ADU. Same as that of Daily Usage type.
selimovd
Most Valuable Professional
5 years agoHey Anonymous ,
then that's not an error. You can check if it's blank to return the Usage Type and otherwise the lookup value.
Try the following measure:
Recommended Daily Usage Type =
VAR vLookupValue =
LOOKUPVALUE(
'Daily Usage Type'[Proposed Daily Usage],
'Daily Usage Type'[PartPlantbyYearWeekNum], 'Master Data Hygiene (2)'[PartPlantbyYearWeekNum]
)
RETURN
IF(
vLookupValue = BLANK(),
'Master Data Hygiene (2)'[Daily Usage Type],
vLookupValue
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic