The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
So I have two tables voucher table (contains a list of all vouchers with voucher number as the primary key) and item table (contains a list of items in each voucher, so multiple enteries for same voucher possible).
Now I need a DAX formula which can help me fill the column Does this voucher contain banana? (return "banana" if yes or else "no").
I am struggling with returing a list of item names that correspond to a particular voucher and then perform an operation on it.
Thanks!
Solved! Go to Solution.
A new column in the voucher
flag =
var _cnt = countx(filter(item, item[Voucher number] = Voucher[Voucher number] &&[Item] = "Banana"),item [Item])
return
if(isblank(_cnt), "No", "Banana")
A new column in the voucher
flag =
var _cnt = countx(filter(item, item[Voucher number] = Voucher[Voucher number] &&[Item] = "Banana"),item [Item])
return
if(isblank(_cnt), "No", "Banana")
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |