Hi there,
I work for a retail company and I a newbie on POWER BI. I have good knowledge in Excel and I am starting to learn POWERBI DAX. I am trying to do simple things to see If I can start to understand how POWER BI works. I never did a calculated field, at least not one that worked as I wanted it to. So, If someone could point me on the right direction I would be glad.
I want to do a simple report with the number of items sold on the past 10 days and how many of that items where in SALE. I was able to setup the MATRIX to show the date with the past 10 days and the number of items sold per establishment, but I don’t know how to do a count when the PRODUCT is on SALE.
My set of data has all the proper relationships made and it is distributed like this.
- A table with all the products (unique values) and attributes – This table is called PRODUCTS.
- A table with all the products sold per establishment and date. (I am using the FIELD DATE as ROW on MATRIX, the FIELD Items_Sold as VALUE and the FIELD BRANCH as COLUMN in the MATRIX) This table is called SOLD_ITEMS
- A table with UNIQUE values with all the PRODUCTS and PRICES and the % of discount of the ITEM. This table is CALLED PRODUCTS_PRICES and has the following FIELDS PRODUCTS, PRICE, DISCOUNT. This TABLE has RELATION with PRODUCTS TABLE and the PRODUCTS table have RELATION with the SOLD_ITEMS table.
My question is how do I create a calculated field that checks if the field DISCOUNT > 0 and count it. I know that I need to add PRODUCT to the matrix so it can bring the discount for each product sold and count them, but I don’t know how to do it.
Thanks in advance!
Regards,
Tiago