Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have a formula that seems to work (assigns negative deltas to negatives, positive deltas to positives), but I can't really understand it, thus not sure if it's possible to improve it.
My_Measure =
CALCULATE (
[Delta],
FILTER (
VALUES ( Products[Items] ),
COUNTROWS (
FILTER ( Ranges, [Delta] >= Ranges[Negative] && [Delta] < Ranges[Positive] )
) > 0
)
)
Ranges is a simple table like this:
Range | Negative | Positive |
Negative | -999999999 | 0.00001 |
Positive | -0.00001 | 999999999 |
Not sure if this table is necessary, however this not my setup, so I don't want to break it, if I'm not sure 100%.
Use DAX Studio (install it if you don't have it) and check the performance of that measure in various scenarios of your dataset. That will show you if you have to optimize it or not.
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |