Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I would like to ask for your help for the following simplified scenario:
There is a table CITIES and a table COUNTRIES and I want to show the cities or countries in a map if the user has access rights (based on row-level security filter) for these cities / countries.
The map should represent cities if the current user has access to less than 5 cities. Otherwise the map should show the countries.
Therefore I tried the following measures but unfortunately the number of rows is always wrong:
CountryOrCity1 = If([CountRows(CITIES)] > 5; CALCULATE(MAX(COUNTRIES[COUNTRY_NAME])); CALCULATE(MAX(CITIES[CITY_NAME])))
CountryOrCity2 = If([CountRows(ALL(CITIES))] > 5; CALCULATE(MAX(COUNTRIES[COUNTRY_NAME])); CALCULATE(MAX(CITIES[CITY_NAME])))
CountryOrCity3 = CALCULATE(If([CountRows(CITIES)] > 5; MAX(COUNTRIES[COUNTRY_NAME]); MAX(CITIES[CITY_NAME])))
CountryOrCity4 = CALCULATE(If([CountRows(ALL(CITIES))] > 5; MAX(COUNTRIES[COUNTRY_NAME]); MAX(CITIES[CITY_NAME])))
Can you please tell me how the number of rows is calculated in the right way?
Thank you in advance.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |