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 all
I'm sure there's a relatively simple answer to this, but I can't think of it for the life of me!
My scenario is that I have two tables - one called Contacts and one called Preferences. Both tables contain the SerialID field, and the Preferences table also contains a Code field. Each SeriaIID can have upto 8 different Codes (A-H), so the SerialID could appear upto 8 times in the Preferences table e.g.
Contacts table
SerialID = 1
SerialID = 2
SerialID = 3
Preferences table
SerialID = 1 / Code = A
SerialID = 1 / Code = F
SerialID = 1 / Code = G
SerialID = 2 / Code = B
SerialID = 3 / Code = H
...and so on.
What I'd like to achieve is a new Column appearing on the Contact table visual within Power BI showing "Yes" if the SerialID and relevant Code appears in the Preferences table.
So, the Contact visual would look something like this:
Any help that you could provide me with would be much appreciated.
Many thanks
Jon
Solved! Go to Solution.
Hi @jonclay
1. Create a 1-to-Many relationship between Contacts[SerialID] and Preferences[SerialID]
2. Place Contacts[SerialID] in the rows of a matrix visual
3. Place Preferences[Code] in the columns of the matrix visual
4. Place this measure in values of the visual
Measure =
VAR aux_ = COUNT( Preferences[Code] )
RETURN
IF(aux_ >0, "Yes")
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Hi @jonclay
1. Create a 1-to-Many relationship between Contacts[SerialID] and Preferences[SerialID]
2. Place Contacts[SerialID] in the rows of a matrix visual
3. Place Preferences[Code] in the columns of the matrix visual
4. Place this measure in values of the visual
Measure =
VAR aux_ = COUNT( Preferences[Code] )
RETURN
IF(aux_ >0, "Yes")
|
|
Please accept the solution when done and consider giving a thumbs up if posts are helpful. Contact me privately for support with any larger-scale BI needs, tutoring, etc. |
Thank you SO much, that works perfectly 🙂
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.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 31 | |
| 27 | |
| 24 |