Show number of distinct values in a grouped row in a matrix visual in Power BI

Viewed 31

I have a matrix visual in PowerBI with two row fields, rf1 and rf2. This goups row field 2 (rf2) by row field 1 (rf1) such that each value in rf1 contains multiple values from rf2. rf1 and rf2 are stored in different tables in the data model, but the tables are connected directly.

I would like to show on the matrix visual the number of unique rf2 values within each rf1 against the corresponding row.

For example (first two colums as collapsable groups as in the matrix visual):

rf1 rf2 rf2 count Values
group1 3 10
a 3
b 1
c 6
group2 2 5
a 2
d 3
Tot -------------- 5 15

What measure do I need to be able to generate this view?

0 Answers
Related