Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have two tables that I'm struggling to relate in the right way.
In one table (BaseSummary), I have a column that successully counts rows of 'soft faults' from the other table (WO Raw Data), as follows:
I then have a final column that totals all the repairs together, as follows:
Solved! Go to Solution.
Hi @CMoppet
Here I recommend that you do not create calculated columns.
Because the calculations are listed as static calculations, you may not be able to change the results dynamically when using the slicer. You might consider creating measures.
For your question, here is the method I provided:
Here's some dummy data
"WO Raw Data"
"BaseSummary"
"Operational"
Create measures.
No. of Soft Repairs =
var _Type = SELECTEDVALUE('BaseSummary'[MonthYearMachineType])
RETURN
COUNTROWS(
FILTER(
'WO Raw Data',
'WO Raw Data'[MonthYearMachineType] = _Type
&&
'WO Raw Data'[HARDSOF] = "Soft"
&&
'WO Raw Data'[MTBF Repair?] = "Repair"
)
)
No. of Hard Repairs =
var _Type = SELECTEDVALUE('BaseSummary'[MonthYearMachineType])
RETURN
COUNTROWS(
FILTER(
'WO Raw Data',
'WO Raw Data'[MonthYearMachineType] = _Type
&&
'WO Raw Data'[HARDSOF] = "Hard"
&&
'WO Raw Data'[MTBF Repair?] = "Repair"
)
)
No. of Repairs = 'BaseSummary'[No. of Hard Repairs] + 'BaseSummary'[No. of Soft Repairs]
MTBF = DIVIDE(SELECTEDVALUE('Operational'[Weeks]), 'BaseSummary'[No. of Repairs])
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @CMoppet
If you are creating a measure, it is first recommended that you do not use EARLIER, which is used in the column. You need to use MAX in measure.
If you still have questions, you can make a new post. You can share your data to get better help. Delete sensitive data.
Regards,
Nono Chen
Hi @CMoppet
Here I recommend that you do not create calculated columns.
Because the calculations are listed as static calculations, you may not be able to change the results dynamically when using the slicer. You might consider creating measures.
For your question, here is the method I provided:
Here's some dummy data
"WO Raw Data"
"BaseSummary"
"Operational"
Create measures.
No. of Soft Repairs =
var _Type = SELECTEDVALUE('BaseSummary'[MonthYearMachineType])
RETURN
COUNTROWS(
FILTER(
'WO Raw Data',
'WO Raw Data'[MonthYearMachineType] = _Type
&&
'WO Raw Data'[HARDSOF] = "Soft"
&&
'WO Raw Data'[MTBF Repair?] = "Repair"
)
)
No. of Hard Repairs =
var _Type = SELECTEDVALUE('BaseSummary'[MonthYearMachineType])
RETURN
COUNTROWS(
FILTER(
'WO Raw Data',
'WO Raw Data'[MonthYearMachineType] = _Type
&&
'WO Raw Data'[HARDSOF] = "Hard"
&&
'WO Raw Data'[MTBF Repair?] = "Repair"
)
)
No. of Repairs = 'BaseSummary'[No. of Hard Repairs] + 'BaseSummary'[No. of Soft Repairs]
MTBF = DIVIDE(SELECTEDVALUE('Operational'[Weeks]), 'BaseSummary'[No. of Repairs])
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ah...I've just spotted one small issue. I've added slicers for 'HARDSOFT' which works as per your efforts. I've also added a slicer for 'MACHINE TYPE', and this also works great.
But....I need to be able to add a slicer for 'MACHINE BRAND' as well. Each Machine Brand contains a number of MACHINE TYPES. This column is present in both of the tables we've been using, and I've linked them (many to many) in the model.
I created a Moving Average measure too, which does seem to respond to the MACHINE BRAND slicer, but the MTBF doesn't. Here is the measure for the Moving Average:
But if I want to display the chart at a machine brand level, I just get this:
Please can you help me understand what link is missing?
Thanks so much again
Hi @CMoppet
If you are creating a measure, it is first recommended that you do not use EARLIER, which is used in the column. You need to use MAX in measure.
If you still have questions, you can make a new post. You can share your data to get better help. Delete sensitive data.
Regards,
Nono Chen
I don't know how to thank you enough for taking the time to explain the approach and attach the example. It all worked perfectly and I know I'll rely on this logic for future projects too. Thank you soooooo much 🙂
User | Count |
---|---|
115 | |
73 | |
60 | |
48 | |
47 |
User | Count |
---|---|
173 | |
123 | |
60 | |
59 | |
57 |