Forum Discussion

KevinSGoff's avatar
KevinSGoff
Helper I
6 years ago

DAX Measure filter question

I've got a PBI page where I'm showing a scatter graph (though it could be any visual)

 

I'm summaring invoices by carrier and location and showing as plotted points.

Now, normally it could be thousands of plotted points.  So logically I want to filter on just those carrier/locations that meet a criteria.

 

The criteria (a measure ) is whether the total freight loss exceeds a certain amount.

 

So...I've got a scatter chart that reads from a model of millions of invoices, and summarizes by carrier/location and shows plotted points, but only for those that exceed a certain amount.


Now...I also have a measure that is the sum of tons across all carriers for that invoice.       I want to use that as a tooltip.

And therein lies the problem.  Let's say we've had 10,000 tons shipped to Kansas City.  
there might have been 2,000 tons shipped using one carrier.   And that carrier had a loss above the threshold.
The other 8,000 tons might have been shipped by other carriers to KC, where they did not incur a loss - and therefore don't show.

However, I want the tooltip to be able to "wiggle out" of the visual filter.

My calculated measure that would normally show 10,000 tons is like this.

Sum of Carrier Tons Across Route All Plants = calculate( [Carrier Inv Tons], all( TestOutputFreightLoss[CarrierName]),
                                                           all( TestOutputFreightLoss[FromFreightLocation]))

My page filter is a measure called [Loss Factor], and I have a filter on the visual that uses the [Loss Factor]

I have tried to modify that calculated measure above, using every combination of FILTER and ALL that I can think of, but nothing seems to work.     In plain english, I wish I could just say in that calculated measure, "ignore the filter on [loss FActor]".  I realize if Loss FActor were a column, it might be easy, but it's a derived measure that does some aggregation.
 
I can't believe I'm saying this, but I know how to do it in MDX  🙂 
 
Any thoughts?
Thanks,
Kevin