Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have following data with me i want to calculate change in price from previous day to current day..can you please help me out on it.how much change is there compared to last day thats what i want..so is there any waty to do it.
Brand | Retailer | Modelname | Modelnumber | Sales Price | Date | Change % |
A | ABC | Product a | 446846 | 177 | 2/12/2017 | |
C | HIJ | Product a | 446846 | 155 | 2/13/2017 | -14% |
A | ABC | Product b | 6553120 | 200 | 2/12/2017 | |
C | HIJ | Product b | 6553120 | 250 | 2/13/2017 | 20% |
Solved! Go to Solution.
Hi @Anonymous,
You can create a measure like below:
Change % = var lD= CALCULATE(LASTDATE(Table1[Date]),ALLEXCEPT(Table1,'Table1'[Modelname])) var LP= CALCULATE(MAX('Table1'[Sales Price]),FILTER(ALLEXCEPT(Table1,Table1[Modelname]),'Table1'[Date]<MAX('Table1'[Date]))) return IF(MAX('Table1'[Date])=lD,DIVIDE(SUM('Table1'[Sales Price])-LP,SUM('Table1'[Sales Price])),BLANK())
Best Regards,
Qiuyun Yu
Hi @Anonymous,
You can create a measure like below:
Change % = var lD= CALCULATE(LASTDATE(Table1[Date]),ALLEXCEPT(Table1,'Table1'[Modelname])) var LP= CALCULATE(MAX('Table1'[Sales Price]),FILTER(ALLEXCEPT(Table1,Table1[Modelname]),'Table1'[Date]<MAX('Table1'[Date]))) return IF(MAX('Table1'[Date])=lD,DIVIDE(SUM('Table1'[Sales Price])-LP,SUM('Table1'[Sales Price])),BLANK())
Best Regards,
Qiuyun Yu
User | Count |
---|---|
106 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |