Reputation: 4428
I have a table with column num
that contain numbers from 10,000 to 1,000,000. This table need to be used as slicer.
Second Table contains ClaimNumber
and LossAmount
per each claim.
How can I generate a new dynamic column (or measure) that would decrease LossAmount per ClaimNumber based on number chosen in a slicer. Only, of course, if Loss Amount is greater than the num
column.
For example if I chose 40,000 then all Claims that have LossAmount more than 40,000 need to be equal 40,000.
On a picture below you see, that choosing 40,000 cap Claim5 and Claim7 became 40,000.
Is it possible to achieve this?
Upvotes: 0
Views: 46
Reputation: 40204
You definitely need to do this as a measure since a calculated column cannot be responsive to slicers.
The measure should be fairly simple.
Capped Loss Amount =
VAR MaxLoss = MAX(Slicer[num])
RETURN
SUMX(
Claims,
IF(
Claims[LossAmount] > MaxLoss,
MaxLoss,
Claims[LossAmount]
)
)
Upvotes: 1