SOLVED

Dax or Power Query Challnege

Brass Contributor

Hi dear Friends
I have problem to applying a formula in Dax or Power Query, 
I have Some items, one list is for purchase and  Selling of our items, each recodr show our selling, and purchase quantity is repeated,  
We have four header fro each items, Item name, Date, Purchase quantity, sales Quantity and Supplier,


Now I need formula in DAX or Power Query to add one Column which it show me the number of Supplier for each items, For example for its " Sweet" we have 2 supplier , 
As I showed the table and the result which i want in Excel Sheet, 

Thank you for your helping in advance ,

2 Replies

@Jalal_1988 DAX is not my speciality. Therefore, I'm offering you a PQ solution. See attached.

best response confirmed by Jalal_1988 (Brass Contributor)
Solution

@Jalal_1988 

Or you may add another column with formula

=SUMPRODUCT(IF([Item]=[@Item],1/COUNTIFS([Item],[@Item],[Supplier],[Supplier]),0))

 

1 best response

Accepted Solutions
best response confirmed by Jalal_1988 (Brass Contributor)
Solution

@Jalal_1988 

Or you may add another column with formula

=SUMPRODUCT(IF([Item]=[@Item],1/COUNTIFS([Item],[@Item],[Supplier],[Supplier]),0))

 

View solution in original post