cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
michelle077 Frequent Visitor
Frequent Visitor

Power BI Formula Help

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!

3 REPLIES 3
Super User
Super User

Re: Power BI Formula Help

Try using BLANK() instead of "".

 

You are trying to return a number under one condition and text under the other condition.


I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

michelle077 Frequent Visitor
Frequent Visitor

Re: Power BI Formula Help

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."

Super User
Super User

Re: Power BI Formula Help

Perhaps try:

 

QC Release Date = IF(IM_ItemWarehouse[Warehouse Code] = "QC",DATEADD(IM_ItemCost[ReceiptDate].[Date],17,DAY),BLANK())

I have book! Learn Power BI from Packt


Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 131 members 1,786 guests
Please welcome our newest community members: