March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a DAX which calculate the Maximum RunTime in Minutes among the 10 number of RunTime
from the Excel file.
Now I need a DAX which visualize that column Bulk_Production and Dyelot No according to maximum
RunTime. Like:-
## If maximum runtime 549 then visualize from same column
I] Bulk_Production 597
II] Dyelot 250890013
III] EndTime 18/8/2024
Can you do it from the link Excel file ?
Actually I need which Dyelot run maximum time, according to maximum runtime need Bulk_production quantity, Dyelot no & End Time. Then I'll able to understand why this dyelot need to run long time as we can calculate with the prduction & Date.
Solved! Go to Solution.
Thanks for the reply from FarhanJeelani , please allow me to provide another insight:
Hi, @Emranit
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
MaxDyelotNo =
VAR MaxRunTime =CALCULATE( MAX('Table'[RunTime]),ALLSELECTED('Table'))
VAR maxno1=CALCULATE(MAX('Table'[Dyelot No]),FILTER('Table','Table'[RunTime]=MaxRunTime))
RETURN maxno1
Maxend = CALCULATE(
MAX('Table'[EndTime]),FILTER('Table','Table'[Dyelot No]=[MaxDyelotNo])
)
MaxBulkProductionRun =
CALCULATE(
MAX('Table'[Bulk_Production]),FILTER('Table','Table'[Dyelot No]=[MaxDyelotNo])
)
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from FarhanJeelani , please allow me to provide another insight:
Hi, @Emranit
Regarding the issue you raised, my solution is as follows:
1.First I have created the following table and the column names and data are the data you have given:
2. Below are the measure I've created for your needs:
MaxDyelotNo =
VAR MaxRunTime =CALCULATE( MAX('Table'[RunTime]),ALLSELECTED('Table'))
VAR maxno1=CALCULATE(MAX('Table'[Dyelot No]),FILTER('Table','Table'[RunTime]=MaxRunTime))
RETURN maxno1
Maxend = CALCULATE(
MAX('Table'[EndTime]),FILTER('Table','Table'[Dyelot No]=[MaxDyelotNo])
)
MaxBulkProductionRun =
CALCULATE(
MAX('Table'[Bulk_Production]),FILTER('Table','Table'[Dyelot No]=[MaxDyelotNo])
)
3.Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes, I got the solution. You are really great. Thanks....Thanks
To fulfill your requirement in Power BI using DAX, where you want to retrieve the "Bulk_Production," "Dyelot No," and "EndTime" based on the maximum "RunTime," you can use the following approach:
1. Calculate the Maximum RunTime
First, create a measure to find the maximum runtime:
DAX
MaxRunTime = MAX('YourTable'[RunTime])
2. Filter Dyelot based on MaxRunTime
Next, create a measure to retrieve the "Bulk_Production," "Dyelot No," and "EndTime" associated with this maximum runtime:
DAX
BulkProductionMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[Bulk_Production]),
'YourTable'[RunTime] = [MaxRunTime]
)
DyelotNoMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[Dyelot No]),
'YourTable'[RunTime] = [MaxRunTime]
)
EndTimeMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[EndTime]),
'YourTable'[RunTime] = [MaxRunTime]
)
Replace `'YourTable'` with the actual name of your table in Power BI.
This setup will allow you to display the maximum runtime details on a card or in a table visualization in Power BI. Let me know if you need further adjustments or if you can share any other details about the data structure!
Please mark this as solution. appreciates Kuos
I'm unable to understand RunTime. If I put RunTime in Minutes replace of RunTIme, it's showing below error. It's happening for DyelotNoMaxRun & EndTimeMaxRun. Please need your help again.
BulkProductionMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[Bulk_Production]),
'YourTable'[RunTime] = [MaxRunTime]
)
DyelotNoMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[Dyelot No]),
'YourTable'[RunTime] = [MaxRunTime]
)
EndTimeMaxRun =
CALCULATE(
SELECTEDVALUE('YourTable'[EndTime]),
'YourTable'[RunTime] = [MaxRunTime]
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
26 | |
21 | |
20 | |
13 | |
12 |
User | Count |
---|---|
40 | |
27 | |
27 | |
21 | |
19 |