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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Calculate Percent Change between two columns in Matrix Visuals

I have following table

 

Date Category Values

2021Q2B10
2021Q4C23
2021Q4D24
2021Q1A56
2021Q1D41
2021Q4D87
2021Q4A90
2021Q3A45

 

 

I want to present it in the Matrix Visuals (it requires to be in Matrix Visuals) where user will choose any two dates from slicer

matrixVisuals.png And I want to add another column to the right of the Matix which will shows percentage change between dates.

output should look like this but in Matrix Visual:
output.png

 

 

 

 

 

 

 

I wrote the following dax but it is not working plus it automatically renders two columns. How can I achive my goals? Any help will be appreciated!

 


Percentage_Change =
VAR SelectStartDate =
    MIN ( 'Table'[Date] )
VAR SelectEndDate =
    MAX ( 'Table'[Date] )
VAR CurrentValue =
    CALCULATE (
        SUM ( 'Table'[Values] ),
        FILTER (
            'Table',
            'Table'[Date] = SelectEndDate
        )
    )
VAR PreviousValue =
    CALCULATE (
        SUM ( 'Table'[Values] ),
        FILTER (
            'Table',
            'Table'[Date] = SelectStartDate
        )
    )
RETURN
    ( CurrentValue - PreviousValue ) / PreviousValue 

 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

where user will choose any two dates from slicer

 

How are you planning to enforce that?

 

Here is a version that simply uses the Min and Max quarter, regardless of how many slicer choices are made.

Caveat - you cannot suppress the single value total

 

lbendlin_0-1709336646419.png

 

 

 

 

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

PBI file attached,

Hope this helps.

Ashish_Mathur_0-1709349866832.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached,

Hope this helps.

Ashish_Mathur_0-1709349866832.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

where user will choose any two dates from slicer

 

How are you planning to enforce that?

 

Here is a version that simply uses the Min and Max quarter, regardless of how many slicer choices are made.

Caveat - you cannot suppress the single value total

 

lbendlin_0-1709336646419.png

 

 

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors