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.
I have a scenario where I have a table with a 1 to many relationship
Questions
QuestionId - Title
QuestionsWorkloadId
QuestionID - WorkloadId - WorkloadAssignmentDate
In the Questions table, I would like to have a column added to show the workloadId for the row with the most recent WorkloadAssignmentDate.
I was looking into using something like
Solved! Go to Solution.
Hi @jthake-msft ,
try this:
MAXX(
TOPN(
1,
RELATEDTABLE ( QuestionWorkloadAssignments),
QuestionWorkloadAssignments[Date],
ASC),
QuestionWorkloadAssignments[workloadId] )
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @jthake-msft ,
try this:
MAXX(
TOPN(
1,
RELATEDTABLE ( QuestionWorkloadAssignments),
QuestionWorkloadAssignments[Date],
ASC),
QuestionWorkloadAssignments[workloadId] )
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Thank you.
If the Workload table had a WorkloadName
Is there a way to output that in the column rather than the WorkloadId?
As I can't seem to add a relationship to this column to a table, so that I can create a chart that shows a breakdown of number of questions by Workload name
Hi
I might be missing something here, but wouldn' t this work?:
MAXX(
TOPN(
1,
RELATEDTABLE ( QuestionWorkloadAssignments),
QuestionWorkloadAssignments[Date],
ASC),
QuestionWorkloadAssignments[Name] )
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
No the name of the workload is in the Workload table not the QuestionWorkloadAssignments table. In the formula, it can't resolve Workload[Name], I'm guessing because it isn't the related table. Although QuestionWorkloadAssignments does have a retionship with the Workload table.
Questions
QuestionId - Title
QuestionsWorkloadAssignments
QuestionID - WorkloadId - WorkloadAssignmentDate
Workload
WorkloadId - WorkloadName
What I did was create a new Column basically adding WorkloadName to the QuestionsworkloadAssignments table. And then used this in the Questions table for CurrentWorkloadName column based on your formula. Thank you!
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 |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |