Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
The first screenshot is the transaction table with every single one. The last column concerns the campaign that the coupon id of the transaction is included
The second screenshot gives us all the details about every single campaign and their coupons. Each campaign has a unique id and has some coupons with their ids. Some coupon id can be found in more than one campaigns.
The case that i want help is that i want to create a new column that shows the current campaign of every single transaction.
The first condition is the the transcation date is between the start and end date of every campaign and the second condition is that the coupon id of the transaction must be inside the group of ids of its spesific campaign
I tried this
Solved! Go to Solution.
Hi @IliasKatsis ,
According to your description, I create a sample to reproduce your problem.
Transactions table:
Campaign details table:
In your formula, the Transactions[coupon_id]inVALUES ('Campaign details'[Coupon ID]) can only indicate that [coupon_id] is listed in the Coupon ID of the entire Campaign details table, but cannot be assigned to the current campaign, modify it to:
Current Camp =
MAXX (
FILTER (
'Campaign details',
Transactions[Transaction Date] >= 'Campaign details'[Start Date]
&& Transactions[Transaction Date] <= 'Campaign details'[End Date]
&& Transactions[coupon_id]
IN SELECTCOLUMNS (
FILTER (
'Campaign details',
'Campaign details'[Campaign ID] = EARLIER ( 'Campaign details'[Campaign ID] )
),
"Coupon", 'Campaign details'[Coupon ID]
)
),
'Campaign details'[Descr]
)
Get the correct result:
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @IliasKatsis ,
According to your description, I create a sample to reproduce your problem.
Transactions table:
Campaign details table:
In your formula, the Transactions[coupon_id]inVALUES ('Campaign details'[Coupon ID]) can only indicate that [coupon_id] is listed in the Coupon ID of the entire Campaign details table, but cannot be assigned to the current campaign, modify it to:
Current Camp =
MAXX (
FILTER (
'Campaign details',
Transactions[Transaction Date] >= 'Campaign details'[Start Date]
&& Transactions[Transaction Date] <= 'Campaign details'[End Date]
&& Transactions[coupon_id]
IN SELECTCOLUMNS (
FILTER (
'Campaign details',
'Campaign details'[Campaign ID] = EARLIER ( 'Campaign details'[Campaign ID] )
),
"Coupon", 'Campaign details'[Coupon ID]
)
),
'Campaign details'[Descr]
)
Get the correct result:
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much!! Everything is running !! You made my day !!
You use INTERSECT() for this.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.