- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Power BI Formula Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-30-2017 01:20 PM
Hello,
I'm having problems getting an expression to work as I am getting the "Expressions that yield variant data-type cannot be used to define calculated columns".
This is what I entered "QC Release Date = IF(IM_ItemWarehouse[Warehouse Code] = "QC",DATEADD(IM_ItemCost[ReceiptDate],17,DAY),"")"
I bascially need to say that if an item is in a specific warehouse, then add 17 days to the "Receipt Date" else Null.
Can someone help me with thisp please?
Thank you!
Re: Power BI Formula Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-30-2017 01:53 PM
Try using BLANK() instead of "".
You are trying to return a number under one condition and text under the other condition.
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!
Re: Power BI Formula Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
11-30-2017 01:56 PM
Now I am getting a different error.
"Function 'DATEADD' expects a contiguous selection when the date column is not unique, has gaps or it contains time portion."
Re: Power BI Formula Help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
12-01-2017 05:19 AM
Perhaps try:
QC Release Date = IF(IM_ItemWarehouse[Warehouse Code] = "QC",DATEADD(IM_ItemCost[ReceiptDate].[Date],17,DAY),BLANK())
Did I answer your question? Mark my post as a solution!
Proud to be a Datanaut!