Sum() Question 4

A dedicated forum to help people when working through the book "Learn to Write DAX"
PaulInSydney
Posts: 6
Joined: Sat Dec 10, 2016 2:43 pm

Sum() Question 4

Postby PaulInSydney » Fri Dec 16, 2016 3:06 pm

Hello,

I've only just started learning DAX, and I'm already having trouble! When I type in the answer to Q4 App A, it keeps saying 'The measure formula must start with an equals sign'. What am I doing wrong?

Using table name 'Sales', I've typed in...
[Total Margin %]=[Total Margin $] / [Total Sales Value]

Regards,
Paul.

guavaq
Posts: 3
Joined: Thu Jun 30, 2016 1:26 am

Re: Sum() Question 4

Postby guavaq » Fri Dec 16, 2016 3:09 pm

Hi there Paul.

It would appear that when you start to type a Measure and give it a name it cannot use the reserved characters of the square brackets "[" "]"

So if you change your measure to the following it should work:
Total Margin % =[Total Margin $] / [Total Sales Value]

MattAllington
Posts: 816
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: Sum() Question 4

Postby MattAllington » Sun Dec 18, 2016 7:48 am

Guavaq. Correct. Where are you writing your measures Paul? Are you using Power BI Desktop? If so, the syntax is as mentioned by guavaq. If you are writing them in the Power Pivot Window in Excel, then it is measure:= formula. If you are writing it in the measure dialog in Excel, it is simply =formula
Matt Allington is Professional Self Service BI Consultant, Trainer and Author of the book "Learn to Write DAX". You can hire me at http://Exceleratorbi.com.au
http://exceleratorbi.com.au/what-is-power-pivot/
http://xbi.com.au/learndax

PaulInSydney
Posts: 6
Joined: Sat Dec 10, 2016 2:43 pm

Re: Sum() Question 4

Postby PaulInSydney » Tue Jan 03, 2017 10:20 am

Hi fellas,

Thank you for getting back, I realized my mistake, I was putting the name of the measure into the formula, when I should have put it in the measure name box!

So my measure formula is just =[Total Margin $] / [Total Sales Value], I then remembered, after running it, that I needed to format it as a percentage, and categorize it as a number.

I feel slightly silly, but I wont be overlooking that again in future, hope you had a good Christmas and NY!

Kind regards,
P.


Return to “Help with the Book "Learn to Write DAX"”

Who is online

Users browsing this forum: No registered users and 1 guest