Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
Could someone help with the below scenario:
I have a table similar to below which holds a list of countries for each row:
| ID | Group | Country |
| 1011 | A | INDIA;CHINA |
| 1038 | A | INDIA;CHINA;ENGLAND;SRILANKA |
| 5052 | B | SWEDEN;FINLAND |
| 3033 | C | SRILANKA |
| 9800 | B | SWEDEN;NORWAY |
| 6500 | B | NORWAY;FINLAND |
Now I need to create a measure that gives me the distinct country based on the filters applied for 'ID' or 'Group' columns.
For example, if i apply the filter "Group = B", it should consider the 3 rows for group B and measure should give me the distinct count as 3. It will get the 3 distinct countries from the combination of those 3 rows (SWEDEN,NORWAY,FINLAND)
Could you please help me here.
In the real scenario the list is much longer.
Solved! Go to Solution.
Hi,
Below are the results as expected..
Firstly ., Need to Split the country column with a delimiter in power query editor.
Then create a measure..
Hi , Please see below
if you are looking for this then follow @Anonymous answer.
Is this something you are looking for?
Thanks.
But I want to get the distinct count of the countries from the column 'Country' for the selected filters.
It has to be "3" when Group B is selected (SWEDEN,NORWAY,FINLAND) ,
"4" for Group A (INDIA, CHINA, ENGLAND, SRILANKA)
and "1" for Group C (Only SRILANKA).
Hi,
Below are the results as expected..
Firstly ., Need to Split the country column with a delimiter in power query editor.
Then create a measure..
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 9 | |
| 5 | |
| 5 |