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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I would like to ask for help as I cannot get over the problem.
I have a matrix table with several measures. These measures are different calculations of contracts for different type of service. It is filtered by service name so I used CONTAINSSTRING for it. I would like to have in the table always only one type of the product and filter it by the slicer. But I do not know how to combine the CONTAINSSTRING and SELECTEDVALUE as it does not work. Below is my measure.
Measure =
Solved! Go to Solution.
Measure =
var s = SELECTEDVALUE('Garance product'[Column 1])
RETURN CALCULATE (
COUNT( 'Orders'[_airtableRecordId] ),
CONTAINSSTRING('Orders'[Product],s),
'Orders'[State] IN { "Fakturace" , "Active"},
USERELATIONSHIP ( 'Calendar'[Date], 'Orders'[Uhrazeno] )
)
Hi @NewPBI_user
First of all, thanks to @lbendlin for the quick and efficient reply.
If your problem is not solved yet, you can also try to use MAX to replace SELECTEDVALUE.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Measure =
var s = SELECTEDVALUE('Garance product'[Column 1])
RETURN CALCULATE (
COUNT( 'Orders'[_airtableRecordId] ),
CONTAINSSTRING('Orders'[Product],s),
'Orders'[State] IN { "Fakturace" , "Active"},
USERELATIONSHIP ( 'Calendar'[Date], 'Orders'[Uhrazeno] )
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 33 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 127 | |
| 115 | |
| 87 | |
| 70 | |
| 69 |