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.
I am pretty new to creating measures and hope someone can help wih this.
I am wanting to calulate % change between two columns (2 different years) but would also like the results to be further broken down by categories (i.e. different markets) that are contained in rows. The measure I have just creates the total % change. This is the measure I am using:
Solved! Go to Solution.
Hi,
Ideally you should append the two datasets (Give a name to this appended dataset as Data). Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm"). In your visual, drag Yea from the Calendar Table (along with other fieldd such as Categories. Write these measures:
Total Expenditure = SUM(Data[Expenditure])
Total Expenditure LY = CALCULATE([Total Expenditure],PREVIOUSYEAR(Calendar[Date]))
Growth in expenditure (%) = IFERROR([Total Expenditure]/[Total Expenditure LY],BLANK())
Hope this helps.
Hi,
Ideally you should append the two datasets (Give a name to this appended dataset as Data). Then create a Calendar Table and build a relationship from the Date column of the appended dataset to the Date column of the Calendar Table. In the Calendar Table, extract Year and Month by using the following calculated column formulas: Year = Year(Calendar[Date]) and Month = FORMAT(Calendar[Date],"mmmm"). In your visual, drag Yea from the Calendar Table (along with other fieldd such as Categories. Write these measures:
Total Expenditure = SUM(Data[Expenditure])
Total Expenditure LY = CALCULATE([Total Expenditure],PREVIOUSYEAR(Calendar[Date]))
Growth in expenditure (%) = IFERROR([Total Expenditure]/[Total Expenditure LY],BLANK())
Hope this helps.
Thanks. This helps!
You are welcome.
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 |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |