Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hello,
I've already used the "in" operator succesfully inside calculated tables. But when I try to use the same syntax inside a measure, than it does not seem to work:
NewMeasure = var vSelection=calculatetable(selectcolumns('table1', "Selection",[items])) return calculate(max(table2[Score]),filter(all(table2),table2[item] in vSelection))
Solved! Go to Solution.
My apologies, the code I have given does work .... but after some nights sleep, I finally noticed now that I had overlooked that a linkage between two tables is affecting my results. So nothing wrong with the code itself
Thank you all,
Stefan
My apologies, the code I have given does work .... but after some nights sleep, I finally noticed now that I had overlooked that a linkage between two tables is affecting my results. So nothing wrong with the code itself
Thank you all,
Stefan
@Anonymous
You can use CONTAINS on a calculate column and then add this column to a measure:
New Column = IF (CONTAINS([Content],"SHOWS"),"SHOWS",IF ([Content] IN {"DRY","WATER"},"DRY","HC"))
i'm not sure,
in this case vSelection is table
filter "in" works with list of values only
try this
NewMeasure = var vSelection=values(table1[items]) return calculate(max(table2[Score]),filter(all(table2),table2[item] in vSelection))
User | Count |
---|---|
90 | |
88 | |
88 | |
79 | |
49 |
User | Count |
---|---|
153 | |
145 | |
106 | |
74 | |
55 |