I am just starting to learn DAX and I am looking to create a measure that counts the number of products with sales greater than say $100,000.
My fact table is at a transaction level like below
Date Product Total Sales
12/1 OrangeA 50000
12/2 OrangeB 50000
12/2 OrangeA 25000
12/3 AppleA 25000
12/3 AppleA 3000
12/4 OrangeB 10000
I have been experimenting with:
SumTotal = SUM([totalsales]
Products>100 = Calculate(Distinctcount('Table'[Product]), [SumTotal]>100000)
But I get an error because I am using the [Sumtotal] measure. So I tried:
Products>100 = CALCULATE(DISTINCTCOUNT('Table'[Product]), 'Table'[TotalSales]>100000)
But this only counts at the line item level where I need the Total Sales aggregated by product if that makes sense..
Let me know if you can help or any thoughts.