Forum Discussion
Need help with the DAX Calculation
- 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
Hi lbendlin,
You're absolutely right, it will always give 1. Actually, this was written by someone a long time back.
I would like to trace how the "Average Lead Time" is 16
Please help me.
Thanks,
Mithilesh
"Average Lead Time" is neither an average nor will it ever hit 16, at least not based on your sample data.
What is the business problem you are trying to solve?
- Anonymous2 years agoNot applicable
I'm trying to find the "Average Lead Time". As per the Power BI file, I created, it shows ""Average Lead Time" as 16. The Power BI file is in the following location
Thanks,
Mithilesh
- lbendlin2 years agoSuper User
Have you tried a graphical solution? Here is the average lead time based on your raw data, by date, Arrival Indiator and Rooms Occ Nr.
What is the point of the running totals?
- Anonymous2 years agoNot applicable
Yes, I did and I'm getting 13.88
However, I'm curious to know how Power BI is returning 16 based on the DAX formula.
I think I'm missing something in the following DAX:
1 % Of Arrivals Running Total =CALCULATE([1 % Of Arrivals],FILTER(ALLSELECTED('Sheet2'[LEAD_TIME_NR]),ISONORAFTER('Sheet2'[LEAD_TIME_NR], MAX('Sheet2'[LEAD_TIME_NR]), DESC)))Thanks,Mithilesh