Hey guys,
can you help me with the following please:
I want to figuere out the first and second Order for each Customer and put it to a column.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD="width: 124"]Customer_id[/TD]
[TD="width: 122"]Order_of_n_day[/TD]
[TD="width: 80"]OrderDay[/TD]
[TD="width: 80"]Orderstring[/TD]
[TD="width: 80"]Revenue[/TD]
[TD="width: 106"]Date[/TD]
[TD="width: 80"]Order no[/TD]
[TD="width: 80"]Category[/TD]
[TD="width: 119"]FirstDayfirstOrder[/TD]
[TD="width: 119"]SecondDay1Order[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]11
[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]29.07.2015 00:01[/TD]
[TD="align: right"]885689[/TD]
[TD]V[/TD]
[TD]V
[/TD]
[TD]S
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]21[/TD]
[TD="align: right"]22,36[/TD]
[TD="align: right"]29.07.2015 00:05[/TD]
[TD="align: right"]885690[/TD]
[TD]F[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD]31[/TD]
[TD="align: right"]49,19[/TD]
[TD="align: right"]29.07.2015 00:06[/TD]
[TD="align: right"]885691[/TD]
[TD]P[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD]41[/TD]
[TD="align: right"]18,02[/TD]
[TD="align: right"]29.07.2015 00:07[/TD]
[TD="align: right"]885692[/TD]
[TD]F[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD]12
[/TD]
[TD="align: right"]108,4[/TD]
[TD="align: right"]01.09.2015 00:01[/TD]
[TD="align: right"]885693[/TD]
[TD]S[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]13[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]07.11.2016 00:01[/TD]
[TD="align: right"]885694[/TD]
[TD]V[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD]23[/TD]
[TD="align: right"]60,17[/TD]
[TD="align: right"]07.11.2016 00:05[/TD]
[TD="align: right"]885695[/TD]
[TD]P[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD]33[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]07.11.2016 00:06[/TD]
[TD="align: right"]885696[/TD]
[TD]V[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]11
[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]29.08.2015 00:01[/TD]
[TD="align: right"]885697[/TD]
[TD]X[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]21[/TD]
[TD="align: right"]22,36[/TD]
[TD="align: right"]29.08.2015 00:05[/TD]
[TD="align: right"]885698[/TD]
[TD]F[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD]31[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]29.08.2015 00:06[/TD]
[TD="align: right"]885699[/TD]
[TD]P[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD]41[/TD]
[TD="align: right"]18,02[/TD]
[TD="align: right"]29.08.2015 00:07[/TD]
[TD="align: right"]885700[/TD]
[TD]F[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD]12[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]01.10.2015 00:01[/TD]
[TD="align: right"]885701[/TD]
[TD]Z[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]13[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]17.11.2016 00:01[/TD]
[TD="align: right"]885702[/TD]
[TD]V[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD]23[/TD]
[TD="align: right"]60,17[/TD]
[TD="align: right"]17.11.2016 00:05[/TD]
[TD="align: right"]885703[/TD]
[TD]P[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD]33[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]17.11.2016 00:06[/TD]
[TD="align: right"]885704[/TD]
[TD]V[/TD]
[TD]X[/TD]
[TD]Z
[/TD]
[/TR]
</tbody>[/TABLE]
Thank you guy, you saved me some extra joins in SQL
Not sure if the DAX Engine performs faster than an SQL Statement...
Greets
Andy
can you help me with the following please:
I want to figuere out the first and second Order for each Customer and put it to a column.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD="width: 124"]Customer_id[/TD]
[TD="width: 122"]Order_of_n_day[/TD]
[TD="width: 80"]OrderDay[/TD]
[TD="width: 80"]Orderstring[/TD]
[TD="width: 80"]Revenue[/TD]
[TD="width: 106"]Date[/TD]
[TD="width: 80"]Order no[/TD]
[TD="width: 80"]Category[/TD]
[TD="width: 119"]FirstDayfirstOrder[/TD]
[TD="width: 119"]SecondDay1Order[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]11
[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]29.07.2015 00:01[/TD]
[TD="align: right"]885689[/TD]
[TD]V[/TD]
[TD]V
[/TD]
[TD]S
[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]21[/TD]
[TD="align: right"]22,36[/TD]
[TD="align: right"]29.07.2015 00:05[/TD]
[TD="align: right"]885690[/TD]
[TD]F[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD]31[/TD]
[TD="align: right"]49,19[/TD]
[TD="align: right"]29.07.2015 00:06[/TD]
[TD="align: right"]885691[/TD]
[TD]P[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD]41[/TD]
[TD="align: right"]18,02[/TD]
[TD="align: right"]29.07.2015 00:07[/TD]
[TD="align: right"]885692[/TD]
[TD]F[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD]12
[/TD]
[TD="align: right"]108,4[/TD]
[TD="align: right"]01.09.2015 00:01[/TD]
[TD="align: right"]885693[/TD]
[TD]S[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]13[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]07.11.2016 00:01[/TD]
[TD="align: right"]885694[/TD]
[TD]V[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD]23[/TD]
[TD="align: right"]60,17[/TD]
[TD="align: right"]07.11.2016 00:05[/TD]
[TD="align: right"]885695[/TD]
[TD]P[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD]33[/TD]
[TD="align: right"]100[/TD]
[TD="align: right"]07.11.2016 00:06[/TD]
[TD="align: right"]885696[/TD]
[TD]V[/TD]
[TD]V[/TD]
[TD]S[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD]11
[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]29.08.2015 00:01[/TD]
[TD="align: right"]885697[/TD]
[TD]X[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD]21[/TD]
[TD="align: right"]22,36[/TD]
[TD="align: right"]29.08.2015 00:05[/TD]
[TD="align: right"]885698[/TD]
[TD]F[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD]31[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]29.08.2015 00:06[/TD]
[TD="align: right"]885699[/TD]
[TD]P[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]1[/TD]
[TD]41[/TD]
[TD="align: right"]18,02[/TD]
[TD="align: right"]29.08.2015 00:07[/TD]
[TD="align: right"]885700[/TD]
[TD]F[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD]12[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]01.10.2015 00:01[/TD]
[TD="align: right"]885701[/TD]
[TD]Z[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[TD]13[/TD]
[TD="align: right"]27[/TD]
[TD="align: right"]17.11.2016 00:01[/TD]
[TD="align: right"]885702[/TD]
[TD]V[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD]23[/TD]
[TD="align: right"]60,17[/TD]
[TD="align: right"]17.11.2016 00:05[/TD]
[TD="align: right"]885703[/TD]
[TD]P[/TD]
[TD]X[/TD]
[TD]Z[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD]33[/TD]
[TD="align: right"]200[/TD]
[TD="align: right"]17.11.2016 00:06[/TD]
[TD="align: right"]885704[/TD]
[TD]V[/TD]
[TD]X[/TD]
[TD]Z
[/TD]
[/TR]
</tbody>[/TABLE]
Thank you guy, you saved me some extra joins in SQL
Not sure if the DAX Engine performs faster than an SQL Statement...
Greets
Andy