## EdX Specific Training Discussion Forum

Occasional Visitor
Posts: 1
Registered: ‎04-05-2017

# Lab 2 Exercise 4

Hi,

after typing in the following measure:

% Sales Market Share = IF([Total VanArsdel Sales]=0,0;DIVIDE([Total VanArsdel Sales];[Total Sales],0))

I'm getting this error:

The syntax for '.0' is incorrect. (DAX(IF([Total VanArsdel Sales]=0.0,DIVIDE([Total VanArsdel Sales],[Total Sales].0))))

I've looked at the hint at the bottom of the page, and adjusted it accordingly but still get the same error

Here's the hint:

• % Units Market Share: % Units Market Share = IF([Total VanArsdel Units]=0,0,DIVIDE([Total VanArsdel Units],[Total Units],0))

Any help?

Highlighted
Member
Posts: 138
Registered: ‎03-10-2016

## Re: Lab 2 Exercise 4

The hint is right, You can refer the formula below:

Measure 2 = IF([Total VanArsdel Sales]=0,0, DIVIDE([Total VanArsdel Sales],[Total Sales],0))

Frequent Visitor
Posts: 2
Registered: ‎02-02-2018

## Re: Lab 2 Exercise 4

I just used =Divide([Total VanArsdel Sales], [Total Sales]) and got the right answer.  What is the benefit to using IF([Total VanArsdel Sales]=0,0, DIVIDE([Total VanArsdel Sales],[Total Sales],0))?

Any other resources that people found helpful for writing DAX formulas?  I am very new to BI and finding them difficult.

Thanks

Frequent Visitor
Posts: 2
Registered: ‎02-02-2018

## Re: Lab 2 Exercise 4

I just used =Divide([Total VanArsdel Sales], [Total Sales])   is there any benefit to using IF([Total VanArsdel Sales]=0,0, DIVIDE([Total VanArsdel Sales],[Total Sales],0)) ??

Are there any resourses that people recommend for getting better understanding of DAX?  I am very new to BI and trying to get a handle on it for a new job.

Thanks