Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI, I need help with the following dax.
I have a table (store name, date, customer ID, bought item , price etc...)
To do a basket analysis, I created a second table with following DAX:
Filter ( Crossjoin ( Values ( 'POS' [Item]), Selectcolumns ( Values ( 'POS' [Item]), "Item2", [Item] )), [Item] > [Item] )
This works fine, but I would like to add, [store name] and [ year-month] .
How can I modify the above Dax that it will contain these two columns?
Thanks for your help
@Anonymous ,
You can have like this
Filter ( Crossjoin ( Values ( 'POS' [Item]), Selectcolumns ( 'POS', "Item2", [Item], "store name" , [store name]," year-month",[ year-month] )), [Item] > [Item] )
Cross join do not take same column name, select columns is used to restrict /rename columns
You can take full tables too.
crossjoin(table1,Table2)
both can have selectcolumns
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |