Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am new here, so possibly this is a stupid question.
I want to have a measure that gives me the amount of collaborations between partners on projects
Im working in powerBI via a direct connection to analysis services. That means I can only add measures.
My data looks a bit like this:
project | partner | Status | month |
A | X | positive | june |
A | Y | positive | june |
B | X | negative | september |
B | Z | negative | september |
B | W | negative | september |
so If I have 3 partners, I would have 2 collaborations.
I have to count the number of collaborations per project with the formula: Σ N*(N-1)/2
Is this possible in a measure?
I cant really figure out how to make it work so it counts per project AND gives me a proper sum.
What I do right now is the following measure, and then in my report filter by project.
Solved! Go to Solution.
@frankvb , Try like
sumx(values(Table[project]) ,calculate(
(distinctcount(table[partner]) *
(distinctcount(table[partner])-1) / 2),
table[status]= "positive"
))
or
averageX(values(Table[project]) ,calculate(
(distinctcount(table[partner]) *
(distinctcount(table[partner])-1) / 2),
table[status]= "positive"
))
@frankvb , Try like
sumx(values(Table[project]) ,calculate(
(distinctcount(table[partner]) *
(distinctcount(table[partner])-1) / 2),
table[status]= "positive"
))
or
averageX(values(Table[project]) ,calculate(
(distinctcount(table[partner]) *
(distinctcount(table[partner])-1) / 2),
table[status]= "positive"
))
Thanks amitchandak!
(this post was edited)
Now I am getting some values! I will validate and let you know if it was what i needed.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
9 |
User | Count |
---|---|
18 | |
13 | |
12 | |
11 | |
8 |