[FONT="]I have a column "Product IDs" with 5 digit serial numbers in them and expenditure column which has amounts. then i have Year column and department column. [/FONT]
[FONT="]I have this below formula. [/FONT]
[FONT="]=SUMPRODUCT(ExpenditureCol[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]umn,--ISNU[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]MBER(MATCH[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](YearColum[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]n,{2019},0[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="])),--(Depa[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]rtmentColu[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]mn="Ophtha[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]lmologist"[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]),--ISNUMB[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ER(MATCH(L[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]EFT(Produc[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]tIDColumn&[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]"#",1),{"3[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]"},0)),1-I[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]SNUMBER(MA[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]TCH(LEFT(P[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]roductIDCo[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]lumn&"####[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]#",3),{"31[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]111"},0)))[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]+SUMPRODUC[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]T(Expendit[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ureColumn,[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]--ISNUMBER[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](MATCH(Yea[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]rColumn,{2[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]019},0)),-[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]-(Departme[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ntColumn="[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]Ophthalmol[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ogist"),--[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](ISNUMBER([/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]SEARCH(","[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]&ProductID[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]Column&","[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="],",22015,2[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]2080,22170[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="],"))))[/FONT]
[FONT="]in this above formula. it basically says that Return SUM for year 2019 and department Ophthalmologist and include all Product IDs starting with digit 3 and exclude only Product 31111 and also add the three Product IDs 22015, 22080 and 22170[/FONT]
[FONT="]This formula works but extremely slow. I am converting this now to a Power pivot with Dax functions.[/FONT]
[FONT="]I need help converting the above-mentioned formula to a Dax formula. any help is greatly appreciated.[/FONT]
[FONT="]I have this below formula. [/FONT]
[FONT="]=SUMPRODUCT(ExpenditureCol[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]umn,--ISNU[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]MBER(MATCH[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](YearColum[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]n,{2019},0[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="])),--(Depa[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]rtmentColu[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]mn="Ophtha[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]lmologist"[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]),--ISNUMB[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ER(MATCH(L[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]EFT(Produc[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]tIDColumn&[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]"#",1),{"3[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]"},0)),1-I[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]SNUMBER(MA[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]TCH(LEFT(P[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]roductIDCo[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]lumn&"####[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]#",3),{"31[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]111"},0)))[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]+SUMPRODUC[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]T(Expendit[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ureColumn,[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]--ISNUMBER[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](MATCH(Yea[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]rColumn,{2[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]019},0)),-[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]-(Departme[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ntColumn="[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]Ophthalmol[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]ogist"),--[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="](ISNUMBER([/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]SEARCH(","[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]&ProductID[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]Column&","[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="],",22015,2[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="]2080,22170[/FONT]<wbr style="font-size: 16px; font-family: "Open Sans", sans-serif;">[FONT="],"))))[/FONT]
[FONT="]in this above formula. it basically says that Return SUM for year 2019 and department Ophthalmologist and include all Product IDs starting with digit 3 and exclude only Product 31111 and also add the three Product IDs 22015, 22080 and 22170[/FONT]
[FONT="]This formula works but extremely slow. I am converting this now to a Power pivot with Dax functions.[/FONT]
[FONT="]I need help converting the above-mentioned formula to a Dax formula. any help is greatly appreciated.[/FONT]