Forum Discussion

jpf5046's avatar
jpf5046
Helper I
9 years ago

Only show 3 or more Races - a grouping problem with DAX

Hello – I’m running into a grouping problem with a DAX formula. I will walk through the dashboard and then state the problem.

 

The dashboard is a collection of races by three different cars, Ford, Audi, and BMW.

 

The cars have had 12 races on two types of courses (City or Track) and the cars had two gas options (leaded or unleaded).

 

This is what the dashboard looks like with no slicers selected:

 

 

On the right hand side we see the count of races by car type, the Box and Whisker in the middle is showing race outcome.  

 

---

 

So for example, when I selected ‘unleaded’ for gas we see Ford does not have any 1st place finishes with unleaded gas and normally finishes 3rd when it does have unleaded gas.

 

 

And we also see on the right hand side, Audi and Ford have performed in six races with unleaded gas, and BMW five races.

 

-----

 

Starting to get into the problem:

 

I only want a car type to show in the Box and Whisker when that car type has had at least three races.

 

Here is an example:

 

 

In this example, the Box and Whisker graph is working exactly as I expect because BMW has less than three races and they do not show up on the Box and Whisker plot.

 

The Box and Whisker is running off the following formula: 

 

Show when 3 total races = if(CALCULATE(DISTINCTCOUNT(cars[Races]), ALLEXCEPT(cars, cars[Car Type], cars[Gas Type], cars[Race Day], cars[Track or City Course])) > 2.5, sum(cars[Place]), blank())

 

------

 

HERE IS AN EXAMPLE OF THE ISSUE

 

Consider the following, there are four races for each car type (before).

 

 

Yet when I select ‘Ford’ in the slicer, I get the following (after):

 

 

Even though there are four races by Ford, the Box and Whisker does not show. I expect it to show, because I know Ford has been in four races, even the table on the right has four listed. The only thing that has changed between the last two pictures is I have Ford selected as a slicer. 

 

I want to show any combination of the four slicers to show in the Box and Whisker plot if the count of races is 3 or above.

 

Does anyone have any insight on this issue?