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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hdsogno
Helper I
Helper I

Calculating Period over Period

Hi All - Having trouble calculating percentage difference between periods.  I have 2 tables, 1 with Dates and 1 with Product data, Customers and Dates.  In the report are 1 Slicer for months and 1 Matrix with Years as columns, Product as rows and Distinct Counts of Customers as values.  I'd like to add to the Matrix the year over year % difference of customers when multiple months are selected in the Slicer but can't seem to figure it out.  Anyone have any ideas?PowerBIReport.png

1 ACCEPTED SOLUTION

@hdsogno , this will come by time intelligence using this year vs last and their diff. Power Bi do not have column diff.

 

Can you share actual data on which you need this, make me @

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
hdsogno
Helper I
Helper I

Thanks for the reply but not what I'm looking for.  I have a date table already.  What I'm looking for is a calculation for the percent difference to produce results like this:

 

                 2019           2020          % Dif

Bolts            4                 4                0%

Nuts            2                 5             150%

Screws        6                 5             - 16%

Total           8                 9                12%

@hdsogno 

 

You may try ISINSCOPE to change the total.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@hdsogno , this will come by time intelligence using this year vs last and their diff. Power Bi do not have column diff.

 

Can you share actual data on which you need this, make me @

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

amitchandak - There was something wrong with my date table.  I fixed it and your solution did work.

 

Thank you.

amitchandak
Super User
Super User

Create a date calendar, Have these months these and try Year formula, It should respond to month filter

This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.