The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
This is my dax formula. In var possibleplayers I want to filter the playerinfo table to only return players with a certain position. I tried using Filter, Values, AllEXCEPT but they return tables.I need a function or a combination that returns a list of values from a column like ALL but unlike ALL can be filltered.
Solved! Go to Solution.
Thanks for trying to help, those solutions didn't work. I didn't find one that solves this issue but I achived the result I wanted in a different way.
Thanks for trying to help, those solutions didn't work. I didn't find one that solves this issue but I achived the result I wanted in a different way.
Hi, @Kapcer
According to your description, you want to return the value of a column of a table. Right?
You can use the FILTER function to filter your table first, then use the SELECTCOLUMNS() function to get a column in that table to generate a new table, like this :
PossiblePlayers = SELECTCOLUMNS(FILTER(ALLSELECTED(playerInfo[ID]),[position] = "your filter condition"),"ID",[ID])
This expression returns a single-column table, and you can use the STATIC() or VALUES() functions for deduplication, or iteratively evaluate using maxX() or MINXX() functions.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Kapcer Try:
VAR PossiblePlayers = SELECTCOLUMNS(FILTER(ALL(playerInfo[ID]),[position] = "something"),"ID",[ID])
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |