Forum Discussion
Replace blank with Not assigned
- 1 year ago
Hi Anonymous ,
Thanks for using Microsoft Fabric Community Forum.
Try using the below DAX to create a new column.Acct Assignment Order - Text (Updated) =VAR AcctAssignment =LOOKUPVALUE('Table2'[Acct Assignment Order - Text],'Table2'[Order Key], 'Table1'[Order Key])RETURNIF(ISBLANK(AcctAssignment) || AcctAssignment = "","Not assigned",AcctAssignment)
Here replace Table 2 with the table name in which there are blanks.
I have replicated the scenario with sample data
Related two tables
Used the newly created column in the visual
Here you can see the blanks are being replaced by Not assigned.
Hope this works for you.
If this helps , please accept as solution to help others find easily and a kudos would be appreciated.
Thank you.
Hi Anonymous ,
Thanks for using Microsoft Fabric Community Forum.
Try using the below DAX to create a new column.
Here replace Table 2 with the table name in which there are blanks.
I have replicated the scenario with sample data
Related two tables
Used the newly created column in the visual
Here you can see the blanks are being replaced by Not assigned.
Hope this works for you.
If this helps , please accept as solution to help others find easily and a kudos would be appreciated.
Thank you.
- Anonymous1 year agoNot applicable
GREAT! It worked. But the DAX only worked for Import mode. Any idea how the DAX be working with Direct Query?
- v-veshwara-msft1 year ago
Community Support
Glad that the DAX worked in Import mode.
The reason it didnt work in DirectQuery is because DirectQuery limits complex DAX functions, leading to performance issues and potential query failures.LOOKUPVALUEcan struggle in DirectQuery mode because it generates complex queries that the backend may not efficiently support.
Use this DAX to create a new column for DirectQuery :Acct Assignment Order - Text (Updated) =IF(ISBLANK(RELATED('Table2'[Acct Assignment Order - Text])) || RELATED('Table2'[Acct Assignment Order - Text]) = "","Not assigned",RELATED('Table2'[Acct Assignment Order - Text]))
Hope this works.
Thankyou.