Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I'm looking to create a formula that allows me to count the number of Items where Sales are greater than $X. I tried the below formula but it is not working properly as it looks to the lowest level of data, which is pulled at the Item, Week, and Retailer Level. I would like this to pull back Total Sales for a SKU during the selected Time Period.
Solved! Go to Solution.
Hi @marksaba ,
Please try code as below to create a measure.
SKU Count Last Week >$10000 =
VAR _SUMMARIZE =
SUMMARIZE (
'Store Inventory and Sales Last Week',
'Store Inventory and Sales Last Week'[NWL Material ID],
"Sum",
CALCULATE (
SUM ( 'Store Inventory and Sales Last Week'[POS Sales Last 01 Wk] )
)
)
RETURN
COUNTROWS ( FILTER ( _SUMMARIZE, [Sum] > 10000 ) )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @marksaba ,
Please try code as below to create a measure.
SKU Count Last Week >$10000 =
VAR _SUMMARIZE =
SUMMARIZE (
'Store Inventory and Sales Last Week',
'Store Inventory and Sales Last Week'[NWL Material ID],
"Sum",
CALCULATE (
SUM ( 'Store Inventory and Sales Last Week'[POS Sales Last 01 Wk] )
)
)
RETURN
COUNTROWS ( FILTER ( _SUMMARIZE, [Sum] > 10000 ) )
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry for not checking the forum earlier but this works perfectly! You're a gem, thank you so much!
First create a measure like this :
Total Sales = CALCULATE(SUM(SalesColumn),ALLEXCEPT(MaterialsTable, MaterialsTable[ItemColumn]))
Then you can create a new measure like this:
Items Count = COUNTROWS(FILTER(VALUES(MaterialsTable[ItemColumn]), [Total Sales] > 10000))
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
83 | |
69 | |
68 | |
39 | |
37 |