Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
andrea9gutiampu
Frequent Visitor

Increase % between two years

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:

 

 

Relationships.png

 

Matrix Result:

 

Matrix.png

 

Thaaanks!!!

1 ACCEPTED SOLUTION

@andrea9gutiampu

 

I recreate your tables in a reduce version:

 

RelationshipsRelationships

 

And Dax and Results

 

Dax and ResultsDax and Results

 

You can try to modify Salesof1YearBefore :

 

Salesof1YearBefore = Calculate([Sales],DATEADD(public_dim_tiempo[Date],-1,YEAR))




Lima - Peru

View solution in original post

8 REPLIES 8
mitsu
Resolver IV
Resolver IV

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

6.PNG

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!

Vvelarde
Community Champion
Community Champion

Hi @andrea9gutiampu

 

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

 




Lima - Peru

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!

 

@andrea9gutiampu

 

I recreate your tables in a reduce version:

 

RelationshipsRelationships

 

And Dax and Results

 

Dax and ResultsDax and Results

 

You can try to modify Salesof1YearBefore :

 

Salesof1YearBefore = Calculate([Sales],DATEADD(public_dim_tiempo[Date],-1,YEAR))




Lima - Peru

It really works! Thank you Vvelarde.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.