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 there!
I've recently completed a finance-oriented course on DAX and Power Pivot/BI.
When calculating sales growth in dollar $ terms the instructor offered 2 different solutions, but with a different outcome:
Measure 1: SalesPY:=CALCULATE([Sales],SAMEPERIODLASTYEAR(Dim_Dates[Date]))
Measure 2:
Sales$Growth:=var PYSales = CALCULATE([Sales],SAMEPERIODLASTYEAR(Dim_Dates[Date]))
return [Sales] - PYSales
The outcome is different one from the other.
Thanks in advance!
Solved! Go to Solution.
Because they are two different calculations. The 2nd measure returns the difference between the current year and the previous year which is clearly indicated by the measure name.
Because they are two different calculations. The 2nd measure returns the difference between the current year and the previous year which is clearly indicated by the measure name.
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |