Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |