The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a scenario wherein, I have a UserName table that contains distinct user names -
UserName |
Annie |
Scott |
Henry |
Now, There is a fact table UserDetails which has following columns.
UserName | Portfolio | Country |
Annie | DS | Denmark |
Annie | DS | Norway |
Annie | TECH | Denmark |
Annie | Digital | Norway |
Scott | Digital | Canada |
Scott | Consulting | US |
Henry | Consulting | AUSTRIA |
Henry | TECH | ITALY |
Henry | DS | GREECE |
I need to create a matrix with Portfolio as rows and Country as column.
when a UserName(from UserName table) is selected in a slicer it should not filter the rows but only the columns.
I want to create a dynamic column that will give me the country names for the user selected from the UserName table.
Also, UserName and UserDetails tables are not related and I'm using reading UserName using selectedValue function and passing that measure in a column(CountryList) to fetch country names from UserDetails table.
Measure in UserName table -
SelectedUserName =
column in UserDetails -
CountryList = If(UserDetails[UserName]=[SelectedUserName],UserDetails[Country],Blank())
But this doesn't seem to be working. Can anyone please help?
Hi @Anonymous,
It's not supported to create a calculated column based on the slicer selection. You can create a measure, and turn on Show items with no data for matrix Rows bucket.
Best Regards,
Qiuyun Yu
Hi, v-qiuyu-msft
Also, I have 2 row levels in a matrix. 1st level - market segment and 2nd level - portfolio.
with one column - Country.
This logic works fine if I use Name column as well as 1st level in the matrix. Not sure why it is not working otherwise.
my requirement is not to see Name in the matrix.
Can u help with this?
Hi @Anonymous,
Please share pbix file with some dummy data, and clarify corresponding result.
Best Regards,
Qiuyun Yu
Hi v-qiuyu-msft,
I have a large dataset but this measure is not returning 1 for few rows even when the names are matching from UserName and UserDetails.
Any idea why is this happening?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
93 | |
85 | |
68 | |
65 |
User | Count |
---|---|
241 | |
124 | |
120 | |
81 | |
79 |