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.
So I have a app table that looks like this
App Name | Index | Dataset |
1 | fb | |
2 | tw | |
Gmail | 3 | gm |
then I have three datasets
users
user name | address | zip | emp id | |
bob | bob@gmail | bob st. NYC | 40203 | 1243 |
steve | steve@gmail | steve st. NYC | 59420 | 0230 |
twitter security
user name | security page | access date |
bob | homepage | 1/1/1200 |
bob | profile | 1/2/1200
|
bob | FAQ | 1/2/1200 |
facebook security
user name | security page | date |
bob | profile | 1/2/1200 |
bob | FAQ | 1/2/1200 |
I then have a table visual which has the app name as the first column. I am trying to create switch statement of some sort to return the second column which is security page. The desired output looks like when I filter on bob:
name | security |
Homepage | |
FAQ | |
Homepage | |
Profile | |
Gmail | No Security |
I have built the following to just test the first table... however it is only returning the max selection. My measure looks like
SECURITY TEST =
IF(HASONEVALUE('App Table'[AppName]),
SWITCH(TRUE(),
'App Table'[Appname] = "Facebook", CALCULATE(IF(MAX('Facebook'[BaseUserName]) = [selectedID], max('Facebook'[Security]) ,0),FILTER('Facebook', 'FacebookID = [selectedID] ))))
BUT ^ this returns only one value from the Facebook security column and not every value. Please help! I cannot create a column in my model on the transactional data.
Hi @Anonymous ,
I'm not very clear about the logic and your expected output according to your data sample and description.
Could you please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business after removing sensitive data?
Best Regards,
Eyelyn Qin
Familiarize yourself with CONCATENATEX().
DAX measures and columns can always only return a single value. Unless you cheat.
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |