Use of Filter Excercise 59

A dedicated forum to help people when working through the book "Learn to Write DAX"
peterhof3
Posts: 7
Joined: Wed Jun 21, 2017 3:36 am

Use of Filter Excercise 59

Postby peterhof3 » Wed Jul 05, 2017 1:39 am

This may just be a best practices question but curious non the less.

In the answer posted to exercise 59 we have
=Calculate ([Total Sales Amount].
Filter (Products, [Total Sales Amount]
<= 10000 && [Total Sales Amount] > 0 ))

Now if I re-write the formula like so:

=CALCULATE(
[Total Sales Amount],
FILTER(Products, [Total Sales Amount] <= 10000)
)

I get the same results without having to use the && operator, unless I want to filter out any returns (as these would show a " - ").

PhilC
Posts: 145
Joined: Tue Sep 09, 2014 8:13 am

Re: Use of Filter Excercise 59

Postby PhilC » Thu Jul 06, 2017 2:00 pm

The exercise asks to find sales of products that have some sales but less than $10k.

The && [Total Sales Amount}>0 is satisfying the "some sale" aspect of this.

peterhof3
Posts: 7
Joined: Wed Jun 21, 2017 3:36 am

Re: Use of Filter Excercise 59

Postby peterhof3 » Thu Jul 06, 2017 11:55 pm

Phil,
Thanks for clearing that up, this sometimes gets confusing at the start.


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

Who is online

Users browsing this forum: No registered users and 1 guest