Forum Discussion

NewPBI_user's avatar
NewPBI_user
Frequent Visitor
2 years ago
Solved

CONTAINSSTRING and SELECTEDVALUE in COUNT function

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 o...
  • lbendlin's avatar
    2 years ago
    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] )
    )