Forum Discussion
Anonymous
8 years agoNot applicable
Affect value based on date range
Hi, I am quite new to PowerBI, and I want to do something that I am able to do with Excel and Macros I have one table called SALES Order,Order_Date,Product,EAN,Categorie,Volume,Price On the co...
- 8 years ago
Hi Anonymous,
First cross join SALES table and CATEGORIE table.
Table_1 = FILTER ( CROSSJOIN ( SELECTCOLUMNS ( SALES, "Order", SALES[Order], "Order_Date", SALES[Order_Date] ), CATEGORIE ), [Order_Date] >= [Start_Date] && [Order_Date] <= [End_Date] )Then, calculate the order number grouped on Suppliers and Category.
Table_2 = SUMMARIZE ( Table_1, Table_1[Supplier], Table_1[Categorie], "Count Order", COUNT ( Table_1[Order] ) )Best regards,
Yuliana Gu
v-yulgu-msft
8 years agoMicrosoft Employee
Hi Anonymous,
First cross join SALES table and CATEGORIE table.
Table_1 =
FILTER (
CROSSJOIN (
SELECTCOLUMNS ( SALES, "Order", SALES[Order], "Order_Date", SALES[Order_Date] ),
CATEGORIE
),
[Order_Date] >= [Start_Date]
&& [Order_Date] <= [End_Date]
)
Then, calculate the order number grouped on Suppliers and Category.
Table_2 =
SUMMARIZE (
Table_1,
Table_1[Supplier],
Table_1[Categorie],
"Count Order", COUNT ( Table_1[Order] )
)
Best regards,
Yuliana Gu
Anonymous
8 years agoNot applicable
Hi,
Sorry for my late reply. Thanks for your solution.
Regards,