Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I'm new in this world of Power BI and I need some help.
I've been trying to get the increase percentage of sales between 2 years. The sales are in the same column and there's a time dimension table where it contains the year.
Thanks for your help!!!
Relationships:
Matrix Result:
Thaaanks!!!
Solved! Go to Solution.
I recreate your tables in a reduce version:
And Dax and Results
You can try to modify Salesof1YearBefore :
Salesof1YearBefore = Calculate([Sales],DATEADD(public_dim_tiempo[Date],-1,YEAR))
One of the ways that you can try to aceive this is as follows .
Create a Prior Year Sales Claculation as
CALCULATE(SUM([Sales]),SAMEPERIODLASTYEAR('Date'[Date]))
The percent inclrease can then be calculated as [Prior Year Sales]-[Sales]/[Sales]
Please make sure your date dimension is marked as a date table .
Hope this helps !!
Hi Mitsu,
Thanks for your help, but your solution doesn't work 😞
Hi andrea9gutiampu,
What is your current situation?
Regarding Matrix, there is no way to remove the first column you marked in the visual. The values shows in that column is for the increase Precent, currently there is no customization available to hide the values that shows no input. For the Totals, we could disable it under the Format pane.
Format->General->Total Column
For the same amount per each city, this could be cuased by that the sales calculated is not associated with the city column(I mean they are not under the same table), or there might be issues regarding the relationships between those tables.
Post back if you need any further assistance.
Regards
Thanks Michael_Shao. It works!
Try with these measures and let me know:
Sales=Calculate(sum(public hec_ventas_ejecu[soles_vv]))
Salesof1YearBefore =Calculate([Sales],Sameperiodlastyear(public_dim_tiempo[Fecha]))
%IncreaseYoY=[Sales]/[Salesof1YearBefore]-1
Hi Vvelarde 🙂
I did what you explained, and the result between 2016 and 2015 was 0.00% ... in the matrix, when I included the measures: Sales=Calculate(sum(public hec_ventas_ejecu[soles_vv])) and Salesof1YearBefore =Calculate([Sales],Sameperiodlastyear(public_dim_tiempo[Fecha])), I got the same amount of sales per each city.
Please, if you can help me, I'll be very thankful.
Thanks!
I recreate your tables in a reduce version:
And Dax and Results
You can try to modify Salesof1YearBefore :
Salesof1YearBefore = Calculate([Sales],DATEADD(public_dim_tiempo[Date],-1,YEAR))
It really works! Thank you Vvelarde.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |