Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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 @PauSe ,
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 @PauSe ,
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 @PauSe
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] )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
37 | |
21 | |
19 | |
15 |
User | Count |
---|---|
125 | |
32 | |
27 | |
24 | |
23 |