Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
I searched for this and couldn't find any similar to my situation. I'm tracking a competitors price for all similar products every day as well as our own prices. Trying to come up with a calculated column where I can determined the whether there is a change in price difference between our price and the competitor price each day
e.g. for one SKU
Date Our price comp price difference change in difference DTD
01/01/17 17 18 1 1 (0 to 1)
02/01/17 17 18 1 0 (1 to 1)
03/01/17 17 17 0 1 (0 to 1)
I want to be able to check everyday using the change in price difference DTD as a filter/slicer all the products where the competitor price have changed.
So this calculated column should show the change in difference based on current data at the row level and also filtered for the the SKU.
Cheers,
Andrew
Solved! Go to Solution.
HI @Pentanol
Andrew
Try this solution
First Add a calculated Column which will RANK the dates for each SKU
Date RANK = RANKX ( FILTER ( ALL ( Table1 ), Table1[SKU] = EARLIER ( Table1[SKU] ) ), Table1[Date], , ASC, DENSE )
Now you can get the Change in Difference using this Calculated Column
Change_In_Difference = VAR previousDayDifference = CALCULATE ( SUM ( Table1[Comp Price] ) - SUM ( Table1[Our Price] ), FILTER ( ALLEXCEPT ( Table1, Table1[SKU] ), Table1[Date RANK] = EARLIER ( Table1[Date RANK] ) - 1 ) ) VAR CurrentDayDifference = Table1[Comp Price] - Table1[Our Price] RETURN CurrentDayDifference - previousdayDifference
See the pic below.I just added another SKU to your sample data
HI @Pentanol
Andrew
Try this solution
First Add a calculated Column which will RANK the dates for each SKU
Date RANK = RANKX ( FILTER ( ALL ( Table1 ), Table1[SKU] = EARLIER ( Table1[SKU] ) ), Table1[Date], , ASC, DENSE )
Now you can get the Change in Difference using this Calculated Column
Change_In_Difference = VAR previousDayDifference = CALCULATE ( SUM ( Table1[Comp Price] ) - SUM ( Table1[Our Price] ), FILTER ( ALLEXCEPT ( Table1, Table1[SKU] ), Table1[Date RANK] = EARLIER ( Table1[Date RANK] ) - 1 ) ) VAR CurrentDayDifference = Table1[Comp Price] - Table1[Our Price] RETURN CurrentDayDifference - previousdayDifference
See the pic below.I just added another SKU to your sample data
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
79 | |
63 | |
52 | |
47 |
User | Count |
---|---|
212 | |
89 | |
76 | |
66 | |
60 |