Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I need a measure that will calculate the following condition: if only two atributes D1 and D2 are selected in the slicer, the D1 value (100) should be multiplied (1.25) and then summ with the D2 value (100). Expected value result - 225.
In all other cases, only the Total Value result (for 1 - 100, for 2 - 200, for 3 - 300, for 4 - 400, for all - 500) should be displayed.
Current DAX is not working:
Solved! Go to Solution.
hi @DmitryAD7
Please try this measure
hi @DmitryAD7
Please try this measure
Thanks a lot!
Try this
Sales with Condition =
VAR _select = SELECTEDVALUE ( 'Dataset'[D] )
VAR _d1_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "D1" ) ) *1.25
VAR _d2_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "_D2" ) )
VAR _defualt_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "_select" ) )
VAR Result =
IF ( _select = "D1" && _select = "D2", CALCULATE(_d1_value+_d2_value),_defualt_value)
If it doesn't work, share a sample PBIX file.
Hi @DmitryAD7 ,
Try this:
I have used CONCATENATEX to build a string that contains the values selected in slicer and check if it is equal to "D1, D2"
VAR _select =
CONCATENATEX(
VALUES('Dataset'[D]),
'Dataset'[D],
", "
)
VAR _d1_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "D1" ) ) * 1.25
VAR _d2_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "D2" ) )
VAR _default_value =
CALCULATE ( [Total Value], FILTER ( 'Dataset', 'Dataset'[D] = "_select" ) )
VAR Result =
IF (
CONTAINSSTRING(_select,"D1, D2"),
CALCULATE ( _d1_value + _d2_value ),
_default_value
)
RETURN
Result
Sorry, but it still doesn't work.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |