Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have an issue with something that I thought would be easy.
Below is a sample of my data. I would want to create a DAX measure that counts the number of companies (distinct!) that have >= 10 Items sold per week. I would then want to show the DAX measure in a bar chart with the week number in the x-axis.
Highlighted in green are the values (summed up per Week) that I would want to count.
Desired output:
I've tried the following, but that didn't work...
Count above 10 = CALCULATE( DISTINCTCOUNT( Table1[Company]), FILTER( Table1, SUM( Table1[Items sold]) >= 10))
I hope somebody can help me figure this out!
Solved! Go to Solution.
Hi @Mr_Glister ,
I made simple samples and you can check the results below:
Total Count = var _t = ADDCOLUMNS('Table',"total",SUMX(FILTER(ALL('Table'),[Week]=EARLIER([Week])&&[Company]=EARLIER([Company])),[Item sold]))
RETURN CALCULATE(DISTINCTCOUNT([Company]),FILTER(_t,[Total]>=10))
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Share the download link of the PBI file or share data in a format that can be pasted in an MS Excel file.
Hi @Mr_Glister ,
I made simple samples and you can check the results below:
Total Count = var _t = ADDCOLUMNS('Table',"total",SUMX(FILTER(ALL('Table'),[Week]=EARLIER([Week])&&[Company]=EARLIER([Company])),[Item sold]))
RETURN CALCULATE(DISTINCTCOUNT([Company]),FILTER(_t,[Total]>=10))
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Daniel,
is this supposed to be Sum() of item sold?
"sold" , [item sold]
sorry for the late reply . it seems that there is a problem with the platform. i m getting no notifications .
correct.
this is sum(item sold)
let me know if you need any help .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠
HI @Mr_Glister
Can you try following DAX instead?
Count above 10 = CALCULATE( DISTINCTCOUNT( Table1[Company]), FILTER( ALL(Table1), SUM( Table1[Items sold]) >= 10))
and let me know if it works
Thanks,
sayali
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
31 | |
26 |