Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi, 
I have two tables - one for sales, and one for promotions we run. 
Sales table includes following columns:
| OrderID | OrderDate | PromoCode | OrderValue | 
Promotions table consists of only two columns:
| PromotionCode | PromoStartDate | 
I'm looking to add a calculated column 'PromotionDay' to the Sales table to return how many days into the Promotion the order was placed. Is this relatively simple to calculate?
example below:
Promotion Table includes record: PromotionCode = 'SPRING22', PromoStartDate = '01 March 2022'
Sales Table would have the below record
| OrderID | OrderDate | PromoCode | OrderValue | PromotionDay | 
| 000987 | 05 March 2022 | SPRING22 | £150.99 | 5 | 
Thanks in advance.
Solved! Go to Solution.
Hi @tc97 
Please try
PromotionDay =
DATEDIFF ( RELATED ( Promotions[PromoStartDate] ), Sales[OrderDate], DAY )
Hi @tc97 
Please try
PromotionDay =
DATEDIFF ( RELATED ( Promotions[PromoStartDate] ), Sales[OrderDate], DAY )
That was nice and easy! Thanks so much!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
            | User | Count | 
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 | 
| User | Count | 
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |