Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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]
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |