Forum Discussion

SBaher's avatar
SBaher
Regular Visitor
4 years ago
Solved

VALUES function not working - using the resulting array of values works ok

Hi,   I am struggling with the VALUES function in the first part of the formula below. I am trying to get a list of unique DEAL_IDs where the Opportunity event happend in any given week (date filte...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi SBaher ,

     

    Check the formula.

    Measure = 
    var _tmp1 = CALCULATETABLE(VALUES('Table'[Deal_ID]),FILTER(ALL('Table'),'Table'[EOW] = SELECTEDVALUE(slicer[EOW])))
    var _tmp2 = CALCULATETABLE(VALUES('Table'[Event]),FILTER('Table','Table'[Deal_ID] in _tmp1))
    return
    IF(SELECTEDVALUE('Table'[Event]) in _tmp2,1,BLANK())

     

    Pbix as attached.

     

    Best Regards,

    Jay