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 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
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |