Forum Discussion
Need help with the DAX Calculation
Hi Team,
I have a sample file. (I'm unable to attach the file over here but I can share)
Based on the data, the output generated by the below dax for "Average Lead Time" is 16.
Average Lead Time =
CALCULATE(MAX(Sheet2[LEAD_TIME_NR]),
FILTER(ALLSELECTED(Sheet2[LEAD_TIME_NR]),[1 % Of Arrivals Running Total] >= 0.8 && [1 Previous Cumulative] < 0.8)
)
Other Dax used:
I tried but unable to break the logic in the dax. Please if someone could help me would be greatly appreciated.
Many Thanks,
Mithilesh
- Anonymous2 years ago
Hi lbendlin,
I was able to break down the working of DAX. Basically, it is performing the running totals to get a distribution of lead time with respect to the average lead time. And this is done by the function ISONORAFTER
9 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- AnonymousNot applicable
Hi lbendlin,
Thank you so much for responding.
I have uploaded the file to the following link.
Thanks,
Mithilesh
- lbendlin
Super User
1 % Of Arrivals = divide([Stay Number of Arrivals], [1 Total Arrivals])This makes no sense as it will always return 1
What are you trying to achieve ultimately?
- AnonymousNot applicable
Hi lbendlin,
I was able to break down the working of DAX. Basically, it is performing the running totals to get a distribution of lead time with respect to the average lead time. And this is done by the function ISONORAFTER