March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |