Forum Discussion
Displaying a Blank for a Date Calculation
- 5 years ago
Hi Anonymous
DAX and M (Power Query) are different languages and you can't use the same commands in both. The DAX code I supplied
Column = IF( OR( ISBLANK([Last Received Date]) , ([Last Received Date] - [Scheduled Date]) < 0 ), BLANK() , [Last Received Date] - [Scheduled Date] )will not work in Power Query.
It's a completely different set of function names and syntax.
Thats why I supplied a PBIX file with some code in Power Query that does what you want using this code to create a Custom Column
= Table.AddColumn(#"Changed Type", "Days Early or late", each [Last Received to Stock] - [Scheduled Due Date])You need to download my PBIX file and look at the code in Power Query then try to apply it to your code.
If you can't get it to work I can't do much more without seeing your Power Query code and at least a sample of your data in Power Query.
Regards
Phil
Hi Anonymous ,
Based on your description, you can get the correct calculation. What do you think about the blank date?
Do you want blank dates to be displayed without calculation?Unfortunately, I can't clearly understand your needs.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.