Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi! I am working with media campaign data in monthly breakdown. How can I define a certain campaign that was active for few consequtive months without a break?
Example: Campaign A was onair in Jan-March, than 2 months off, than on again June-July. I want to distinguish these 2 campaigns from each other and than aggregate their data rows with group_by function.
Thanks, Nora
new column with an if statement??
@Nora_Hor wrote:Hi! I am working with media campaign data in monthly breakdown. How can I define a certain campaign that was active for few consequtive months without a break?
Example: Campaign A was onair in Jan-March, than 2 months off, than on again June-July. I want to distinguish these 2 campaigns from each other and than aggregate their data rows with group_by function.
Thanks, Nora
Could you give me further help writing the statement? I can't define a statement as i don't know how to refer to previous row/cell. My data set looks like:
Campaign name | Year | Month | Value |
A | 2018 | 2 | 200 |
A | 2018 | 3 | 415 |
A | 2018 | 4 | 404 |
A | 2018 | 8 | 30 |
A | 2018 | 9 | 660 |
B | 2018 | 4 | 440 |
B | 2018 | 5 | 632 |
B | 2018 | 10 | 30 |
Thank You very much!
Better with Group By => campaing name =>sum => value.
Thanks but that's the point: A campaign had 2 separate waves that I need to keep separate during sum. That's my problem 🙂
Hi Nore_Hor,
I am not clear about your requirement, so if possible, could you please inform me more detailed information(such as your sample data and expected output)?
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I would aggregate data rows by campaign waves ( one wave = same campaign name, active for consequtive months without a break) So I need a statement or other kind of solution to distinguish different campaign waves.
Sample data:
Campaign name | Year | Month | Value |
A | 2018 | 2 | 200 |
A | 2018 | 3 | 415 |
A | 2018 | 4 | 404 |
A | 2018 | 8 | 30 |
A | 2018 | 9 | 660 |
B | 2018 | 4 | 440 |
B | 2018 | 5 | 632 |
B | 2018 | 10 | 30 |
Expected output:
Campaign name | Year | Start Month | End Month | Value |
A | 2018 | 2 | 4 | 1019 |
A | 2018 | 8 | 9 | 690 |
B | 2018 | 4 | 5 | 1072 |
B | 2018 | 10 | 10 | 30 |
Could you please help?
Thanks,
Nora
I don't know how to do it...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
79 | |
73 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |