Forum Discussion
Anonymous
8 years agoNot applicable
Second last order
Hi, im new with Power BI and it feels already like a very strong program for analyze and visualize. Right now I have been using very simple measures and want to go futher but im geting stuck with som...
- 8 years ago
Hi Anonymous
This measure shall get you the second last order
Second Last Order = VAR LastOrder = MAX ( Table1[Order ID] ) RETURN CALCULATE ( MAX ( Table1[Order ID] ), FILTER ( Table1, Table1[Order ID] < LastOrder ) ) - 8 years ago
Hi Anonymous
This measure shall get you the difference in days between last and second last order
Days = VAR Secondlastorder = CALCULATE ( MAX ( Table1[Order ID] ), FILTER ( Table1, Table1[Order ID] < MAX ( Table1[Order ID] ) ) ) VAR LastOrder = MAX ( Table1[Order ID] ) RETURN DATEDIFF ( CALCULATE ( VALUES ( Table1[Delivery Date] ), Table1[Order ID] = Secondlastorder ), CALCULATE ( VALUES ( Table1[Delivery Date] ), Table1[Order ID] = lastorder ), DAY )
Zubair_Muhammad
Community Champion
8 years agoAnonymous
8 years agoNot applicable
Im srry for late answer but your solutions helped me alot. Thank you so much.