The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I want to show percent increase in sales but I want it to work in a way that whenever we do data refresh it calculate percent increase from last data refresh.
Please let me know how we can reslove this.
Thanks.
Solved! Go to Solution.
Hi @Anonymous
Thanks for reaching out to us.
>> I want to show percent increase in sales but I want it to work in a way that whenever we do data refresh it calculate percent increase from last data refresh.
Usually we will get the time between two refreshes, then calculate the time interval between them, and then calculate the percentage of increase in sales.
For example,
Measure =
var _3rdDate=MAXX(ALL('Table'),[date]) // last refresh date
var _2ndDate=MAXX(FILTER(ALL('Table'),'Table'[date]<_3rdDate),[date]) //this refresh date
var _diff= DATEDIFF(_2ndDate,_3rdDate,DAY)
var _2ndSale=SUMX(FILTER(ALL('Table'),'Table'[date]=_2ndDate),[sales])
var _3rdSale=SUMX(FILTER(ALL('Table'),'Table'[date]=_3rdDate),[sales])
return DIVIDE(_3rdSale-_2ndSale,_diff)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thanks for reaching out to us.
>> I want to show percent increase in sales but I want it to work in a way that whenever we do data refresh it calculate percent increase from last data refresh.
Usually we will get the time between two refreshes, then calculate the time interval between them, and then calculate the percentage of increase in sales.
For example,
Measure =
var _3rdDate=MAXX(ALL('Table'),[date]) // last refresh date
var _2ndDate=MAXX(FILTER(ALL('Table'),'Table'[date]<_3rdDate),[date]) //this refresh date
var _diff= DATEDIFF(_2ndDate,_3rdDate,DAY)
var _2ndSale=SUMX(FILTER(ALL('Table'),'Table'[date]=_2ndDate),[sales])
var _3rdSale=SUMX(FILTER(ALL('Table'),'Table'[date]=_3rdDate),[sales])
return DIVIDE(_3rdSale-_2ndSale,_diff)
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I don't know how to retrieve the last update date but I will follow this post as big names are tagged here and surely interesting new information will flow through.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
13 | |
8 | |
8 |