Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
Is there are dax function where I can store values which one I want without storing it in a table?
Something like Data validation in excel as I need it for the dropdown.
I need to store 2 values, "Weighted" and "Unweighted". Usually I would create a table with only those 2 values but I want to know if there is a way to do this wth function.
Solved! Go to Solution.
Hi @Krcmajster,
You can direct define it in var function to store these parameter as list.
Sample:
Measure=
var _list= {"Weighted","Unweighted"}
return
IF(selectedvalue(Table[Column]) in _list, "Y","N")
Notice: they can only used in current measure itself and you can't get this variable list from outside.
Regards,
Xiaoxin Sheng
Hi @Krcmajster,
You can direct define it in var function to store these parameter as list.
Sample:
Measure=
var _list= {"Weighted","Unweighted"}
return
IF(selectedvalue(Table[Column]) in _list, "Y","N")
Notice: they can only used in current measure itself and you can't get this variable list from outside.
Regards,
Xiaoxin Sheng
@Krcmajster You can create a variable and store those two values as a list. But again it will be global outside that DAX calculation, that means you need to do everytime in all DAX calculations where you require those list. In Power Query, you can create a LIST that can be accessible while filtering/parameterizing other tables as well.
Proud to be a PBI Community Champion
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 159 | |
| 132 | |
| 118 | |
| 79 | |
| 53 |