Forum Discussion
Anonymous
2 years agoNot applicable
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 Le...
- 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
lbendlin
2 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?
Anonymous
2 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