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 wanna lookup the measure from Table A to Table B.
Table A:
I have calculate a measure Available Technician = DISTINCTCOUNT(Technician).
Line | Group | Technician |
ABC | ABC-123 | Sam |
ABC | ABC-123 | Lilly |
ABC | ABC-234 | Billy |
BCD | BCD-123 | Cath |
BCD | BCD-234 | Edward |
Table B:
In this table, I calculate Current Technician = DISTINCTCOUNT(Technician)
Line | Group | Technician | Total hours |
ABC | ABC-123 | Aaron | 12.5 |
ABC | ABC-234 | Ben | 4.5 |
BCD | BCD-234 | Edward | 16.3 |
ABC | BCD-234 | James | 3.2 |
I would like to combine these 2 information in one table as below:
Line | ABC | BCD | ||
Group | ABC-123 | ABC-234 | BCD-123 | BCD-234 |
Available Technician | 2 | 1 | 1 | 1 |
Current Technician | 1 | 1 | 0 | 2 |
@PBI_newuser see attached, you can tweak it as you see fit.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @PBI_newuser ,
Since i cannot open the link of your newly shared file, I tested it on the original data model: created a calculated column to count the number of Line and Group respectively, and finally use the divide function to calculate the proportion of each technician:
C =
VAR a =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( ALL ( 'Table' ), 'Table'[Line] = EARLIER ( 'Table'[Line] ) )
)
VAR b =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( ALL ( 'Table' ), 'Table'[Group] = EARLIER ( 'Table'[Group] ) )
)
RETURN
DIVIDE ( b, a )
In the matrix table, replace the previous field with the calculated column created and put it in the value to get the following result:
If it still does not solve your problem, please confirm whether the shared file link can be opened correctly, or change the sharing method. So that I can use the correct data for further testing. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PBI_newuser where you get from available vs current technician? It is not in the tables? what is the logic for it?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k I created a measure "Current Technician" in Table B and "Available Technician" in Table A.
Current Technician = DISTINCTCOUNT(Technician)
Available Technician = DISTINCTCOUNT(Technician)
I wanted to compare the count of technician with its associated Line & Group.
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 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |