Reply
Regular Visitor
Posts: 25
Registered: ‎03-26-2018

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

Community Support Team
Posts: 2,043
Registered: ‎06-24-2018

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.
Attachment
Regular Visitor
Posts: 25
Registered: ‎03-26-2018

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? 

Community Support Team
Posts: 2,043
Registered: ‎06-24-2018

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.
Community Support Team
Posts: 2,043
Registered: ‎06-24-2018

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.
Regular Visitor
Posts: 25
Registered: ‎03-26-2018

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?

Community Support Team
Posts: 2,043
Registered: ‎06-24-2018

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.