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
Hello,
Lets say I have a table called dim_clusters and another called dim_countries.
Clusters have a relationship with countries, and selecting a cluster on a slicer/filter will filter the dim_countries table
I am trying to create a measure, that will tell me how many countries it exists based on a slicer selection.
I used the LEN,calculatetable,filter,values but I can never get the right number...
Either I get the number of all rows or the number of rows that I select directly on dim_country slicer.
It should ignore the filter applied on dim_country, but it should take into consideration filters applied on dim_clusters table.
How can I achieve this?
Thank you!
Solved! Go to Solution.
Hey,
here you will find a little PBIX
Not sure if I understand your requirement correctly, but from my point of view this report look quite good:
I created this DAX statement
No =
CALCULATE(
COUNTROWS(
'Country'
)
,ALL('Country'[Country])
,VALUES('Country'[Cluster])
)The measure results to 2 due to the fact, that the slicer from the country column reduces the the country table and there are just 2 countries in the same cluster as the filtered country Germany.
Hope this is what you are looking for
Regards
Tom
Hey,
here you will find a little PBIX
Not sure if I understand your requirement correctly, but from my point of view this report look quite good:
I created this DAX statement
No =
CALCULATE(
COUNTROWS(
'Country'
)
,ALL('Country'[Country])
,VALUES('Country'[Cluster])
)The measure results to 2 due to the fact, that the slicer from the country column reduces the the country table and there are just 2 countries in the same cluster as the filtered country Germany.
Hope this is what you are looking for
Regards
Tom
Yes, this solution works :).
Thank you.
Cheers!
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |