cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Liism Regular Visitor
Regular Visitor

Comparison in Power BI

Hi, 

 

I have data about roles and programs each role is using. I would like to have a measure or sth that will compare the results. 

 

For example, if Role A is using programs X, Y, Z and Role B is using programs M, X, Y then 66,67% is matching. 

 

Thank you, 

Liis

6 REPLIES 6
v-danhe-msft Super Contributor
Super Contributor

Re: Comparison in Power BI

Hi @Liism,

Based on my test, you could refer to below steps:

Sample data:

1.PNG

Create a measure:

Measure = DIVIDE(COUNTROWS(VALUES(Table1[B]))-COUNTROWS(EXCEPT(VALUES(Table1[B]),VALUES(Table1[A]))),COUNTROWS('Table1'))
Result:
1.PNG
You could also download the pbix file to have a view.
 
Regards,
Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Liism Regular Visitor
Regular Visitor

Re: Comparison in Power BI

Thank you for your input. But what if I now have 60 roles and if I randomly want to compare two of them, then does it mean I would need to make lots of measures? Basically, one measure per each pair? Would there be an easier method? 

v-danhe-msft Super Contributor
Super Contributor

Re: Comparison in Power BI

Hi @Liism,

If your data structure is like the picture I have posted before, I am afraid you need to create multiple measures to meet your requirements.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft Super Contributor
Super Contributor

Re: Comparison in Power BI

Hi @Liism,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Liism Regular Visitor
Regular Visitor

Re: Comparison in Power BI

I think creating so many measures is not an option for me.. Would there be an easier solution if the data would be modified in some other way?

v-danhe-msft Super Contributor
Super Contributor

Re: Comparison in Power BI

Hi @Liism,

Could you please offer a sample data to have a test and post your desired result if possible?

 

Regards,

Daniel He 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 6 members 1,595 guests
Please welcome our newest community members: