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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
deven11
Frequent Visitor

I want to perform this year vs previous year in matrix visual multilevel filter

1 ACCEPTED SOLUTION
MNedix
Super User
Super User

Heya,

There are a couple of things you have to keep in mind and this is important in every analysis:
1. have a dedicated Date table - your file was missing such table so I created one for you and connected it to your Billing Date

2. formatting is key - your Percentage column is not formatted properly and unfortunately there was nothing I could do since I didn't have access to the source file

3. create explicit measures - do not rely on PowerBI to do the Sum or Count for you but specifically create these measures

 

Having said that, if I understood your problem correctly, I believe it can be solved by creating a calculation group with two simple measures (as below):

YTD = CALCULATE(SELECTEDMEASURE(),DATESYTD('Date'[Date]))

pYTD = CALCULATE(SELECTEDMEASURE(),PARALLELPERIOD('Date'[Date],-1,YEAR))

 

See attached file.



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

View solution in original post

3 REPLIES 3
mulhimstep
New Member

A detailed explanation would be good for me too

MNedix
Super User
Super User

Heya,

There are a couple of things you have to keep in mind and this is important in every analysis:
1. have a dedicated Date table - your file was missing such table so I created one for you and connected it to your Billing Date

2. formatting is key - your Percentage column is not formatted properly and unfortunately there was nothing I could do since I didn't have access to the source file

3. create explicit measures - do not rely on PowerBI to do the Sum or Count for you but specifically create these measures

 

Having said that, if I understood your problem correctly, I believe it can be solved by creating a calculation group with two simple measures (as below):

YTD = CALCULATE(SELECTEDMEASURE(),DATESYTD('Date'[Date]))

pYTD = CALCULATE(SELECTEDMEASURE(),PARALLELPERIOD('Date'[Date],-1,YEAR))

 

See attached file.



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,
Kedar_Pande
Community Champion
Community Champion

Please explain in detail

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.