Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi Team,
Need your opinion on below issue:
I have a filter "Transactions" which has two values:
1.Giver
2.Receiver
By default, when i select "Giver", i get sum value in the DataCard.
Same for the "Receiver".
Now what i want is when i select both "Giver" and " Receiver", data card should provide me the value which is ["Giver Record Values" - "Receiver Record Values"].
Also when there is no value selected, i want to show the sum of all the records.
I tried using "Calculated Column" where i marked "Receiver" values (-). But when nothing is selected i get subtracted values.
How do i achieve this.
Solved! Go to Solution.
hi, @VinayakKarne
For your case, just try this logic to create a measure
Measure =
IF (
ISFILTERED ( 'Table'[Type] ),
IF (
HASONEVALUE ( 'Table'[Type] ),
CALCULATE ( SUM ( 'Table'[Value] ) ),
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Giver" )
- CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Receiver" )
),
CALCULATE ( SUM ( 'Table'[Value] ) )
)
Result:
Simple sample data
select "Giver"
select "Receiver"
no value selected
select both "Giver" and " Receiver"
and here is sample pbix file, please try it.
Regards,
Lin
hi, @VinayakKarne
For your case, just try this logic to create a measure
Measure =
IF (
ISFILTERED ( 'Table'[Type] ),
IF (
HASONEVALUE ( 'Table'[Type] ),
CALCULATE ( SUM ( 'Table'[Value] ) ),
CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Giver" )
- CALCULATE ( SUM ( 'Table'[Value] ), 'Table'[Type] = "Receiver" )
),
CALCULATE ( SUM ( 'Table'[Value] ) )
)
Result:
Simple sample data
select "Giver"
select "Receiver"
no value selected
select both "Giver" and " Receiver"
and here is sample pbix file, please try it.
Regards,
Lin
@VinayakKarne Please provide some sample test data and expected output which will be helpful to provide an accurate solution.
But by the look of it, you need to create a Measure not a calculated column. In the measure, use the selectedvalue to capture the filter selection.
Sample test data will be really helpful !
Proud to be a PBI Community Champion
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 43 | |
| 30 | |
| 24 |