This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Let's say I have two tables
| ORDERS -------- Order_Num, Material_Code, etc., etc., Ord001, 1001 Ord002, 1002 Ord003, 1003 Ord004, 1003 Ord005, 1001 | MATERIALS ------------- Material_Code, Material_Desc |
In reality my MATERIAL table is huge but I need to use Material Description as a slicer but I only want those descriptions showing that are actually in the current ORDER data, meaning each time the ORDER data is refreshed, the slicer should be refreshed. So I decided I needed a dynamic table to feed the slicer and based on the above data it would only contain:
MATERIAL_SLICER
----------------
Material_Code Material_Desc
1001 Blue
1002 Green
1003 Yellow
Now I have tried various DAX such as SUMMARIZE, SUMMARIZECOLUMNS, CALCULATETABLE but I am not getting what I want. If I was to write this in pseudo SQL it would be something like this:
SELECT Material_Code, Material_Desc
FROM Material
WHERE Material_Code in (SELECT DISTINCT Material_Code from Orders)
What is the similar DAX syntax?
\ paul
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
Table = FILTER('MATERIALS',[Material_Code] in VALUES(ORDERS[ Material_Code]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try:
Table = FILTER('MATERIALS',[Material_Code] in VALUES(ORDERS[ Material_Code]))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @Anonymous
Thanks but unfortunately not the solution. The way I understand the SUMMARIZE function is that it can only summarize on a field in its own dataset.
This works: slicerTable = SUMMARIZE(Orders,Orders[Materials_Code]) and returns the distinct list of codes (but no descriptions of course).
slicerTable =SUMMARIZE(Orders,Orders[Material_Code], Materials[Materials_Desc] )
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |