Forum Discussion
Power BI Year Over Year analysis using the matrix visual
- 3 months ago
Hi LondiweNkosi,
Thanks for reaching fabric community, You can perform below steps to calculate %chnage by selecting the slicers.
1) Relationship should be like between your sales and date table.2) Create measures
- GP = SUM ( SalesData[GP] )- GP Previous Year =CALCULATE ([GP],SAMEPERIODLASTYEAR ( 'Date'[Date] ))- GP YoY % =DIVIDE ( [GP] - [GP Previous Year], [GP Previous Year] )3) Matrix visual format should be like this
Just want to conform you need YOY % chnage is that correct?
Please consider as an accepted solution if helps or give some kudos.
sample table I createdSalesData = DATATABLE ( "Customer", STRING, "Date", DATETIME, "GP", INTEGER, { { "DTX", "2023-03-01", 1825000 }, { "DTX", "2024-03-01", 1745623 }, { "Ftech", "2023-03-01", 2325460 }, { "Ftech", "2024-03-01", 1014587 }, { "Clicks", "2023-03-01", 985625 }, { "Clicks", "2024-03-01", 1003265 }, { "Joe Soap", "2023-03-01", 114522 }, { "Joe Soap", "2024-03-01", 256341 } } )Date = ADDCOLUMNS ( CALENDAR ( DATE ( 2023, 1, 1 ), DATE ( 2024, 12, 31 ) ), "Year", YEAR ( [Date] ), "Month Name", FORMAT ( [Date], "MMM" ), "Month Number", MONTH ( [Date] ), "Year Month", FORMAT ( [Date], "MMM yyyy" ) )
Hi LondiweNkosi
Thank you for reaching out to the Microsoft Fabric Community Forum.
Just checking in, were you able to resolve the issue? If not please feel free to share an update and we will be happy to assist further.
Your feedback will also help others facing similar challenges.
Thank you.
Yes, the issue was resolved thank you.