cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Arjunarao Regular Visitor
Regular Visitor

Re: DAX IF Formula error

Yes. But why dont you upload the sample file?
tarunsingla Established Member
Established Member

Re: DAX IF Formula error

Try this:

 

Vol(Cases / Suom) =
IF (
t_sales_aggregate[Actual or Forecast] = "Forecast",
( t_sales_aggregate[Volume (Cases)] && t_sales_aggregate[Volume (SUOM)] )
* AVERAGE ( t_sales_aggregate[Forecast Growth] ),
FORMAT(( t_sales_aggregate[Volume (Cases)] && t_sales_aggregate[Volume (SUOM)] ), "General Number")
)

 

This will ensure that the data type of the result if true is the same as data type of the result if false i.e. Decimal Number in your case.

 

Give it a try.

 

Regards,

Tarun

Rubal Frequent Visitor
Frequent Visitor

Re: DAX IF Formula error

Hi Tarun,

 

I have tried your piece of code and still showing me the same error. I just don't know what is going on with this 😞

 

variant data type 2.jpg

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 223 members 2,126 guests
Please welcome our newest community members: