Forum Discussion
Show All Lines Using Contains, With a Dynamic Filter
I have found similar issues, but none that seams to match what I am looking for.
I would like to show all items contained on an invoice, where the customer has used a coupon code. We have various coupon codes, each one as a unique Item Number. Currently, I have gotten my measure to work, but only if I specify the Coupon Code in the measure. In the formula below, all items are being show, by invoice (SOP) number, where the coupon used is WEBCOUPON SALE35.
I would like to enable the user to have a filter, which contains the phrase WEBCOUPON. From that filter, the could select which WEBCOUPON(s) they would like to display, and then show all invoices and lines on the invoices.
VALUES('Total Combined Sales'[Item Number])
,ALLEXCEPT('Total Combined Sales','Total Combined Sales'[SOP Number])),
'Total Combined Sales'[Item Number],"WEBCOUPON SALE35"),1,0)
2 Replies
- amitchandakSuper User
dkalina97 , You can create a measure like
var _cnt = calculate(countrows(filter('Total Combined Sales',containsstring('Total Combined Sales'[Item Number],"WEBCOUPON SALE35") )), ALLEXCEPT('Total Combined Sales','Total Combined Sales'[SOP Number]))
return
calculate(countrows(filter('Total Combined Sales',not(Isblank(_cnt))))) - dkalina97Helper I
This is similar to what I had already written.
We also have WEBCOUPON SHIP FREE. And WEBCOUPON 25.
I would like the user to be able to select which coupon to view, and then to view all invoices and items on those invoices where that particular coupon code was used.