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.
Hi everyone,
After hours of arguing with ChatGpt, sudden blurry vision and probably acute OCD due to errors showing up with my formula, Im finaly here.
All I want is to display the count of products with the same DCI for each combination of labs, even if the labs are different ( all what I managed to do is to display it only when the lab is the same, if my boss sees it ... 😏)
Well that's it, Im counting on any charitable soul here, thanks in advance 🙏🏻
PS: the actual formula:
CommonProducts =
CALCULATE(
COUNTROWS(db),
ALLEXCEPT(db, db[Lab], db[DCI])
)
Solved! Go to Solution.
Hi @Aida_Ken ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table =
var _table1=
DISTINCT('db'[Lab])
var _table2=
DISTINCT('db'[Lab - Copy])
return
CROSSJOIN(
_table1,_table2)
2. Create calculated column.
Column =
COUNTX(
FILTER(ALL('db'),
'db'[Lab]=EARLIER('Table'[Lab])),[the actual formula:CommonProducts])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Aida_Ken ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table =
var _table1=
DISTINCT('db'[Lab])
var _table2=
DISTINCT('db'[Lab - Copy])
return
CROSSJOIN(
_table1,_table2)
2. Create calculated column.
Column =
COUNTX(
FILTER(ALL('db'),
'db'[Lab]=EARLIER('Table'[Lab])),[the actual formula:CommonProducts])
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |