Forum Discussion
SBaher
4 years agoRegular Visitor
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...
- Anonymous4 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
Anonymous
4 years agoNot applicable
Hi SBaher ,
Why using VALUES() function?
Check if the below formula works.
Measure = CALCULATE(DISTINCTCOUNT('Table'[id]),FILTER('Table',[_flag]=1))
If you still want use VALUES() function, refer this formula.
Measure 2 =
var _list = CALCULATETABLE(VALUES('Table'[id]),FILTER('Table',[_flag]=1))
return
CALCULATE(DISTINCTCOUNT('Table'[id]),ALL('Table'),'Table'[id] in _list)
Best Regards,
Jay
SBaher
4 years agoRegular Visitor
Hi,
Thank you for looking into this, but unfortunately this still doesn't work in my case, hence it should not have been accepted as a solution.
Thanks,