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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Merle
Frequent Visitor

Finding the difference between date values in the same row of different column within a Matrix

Hi,

I will greatly appreciate help in finding the difference between dates values within a matrix inorder to determine WoW%.

Desired out put in screen shot below.

This visual was obtain using the new tool New Calculation(fx) but has limitation of not being able to export data with these calculations.

Desire output.PNG

These are the calculation used.

Versus previous = [Purchase Complete] - PREVIOUS([Purchase Complete], COLUMNS).
WOW = FORMAT(DIVIDE([Versus previous], PREVIOUS([Purchase Complete],COLUMNS),0),"#,#0%").

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Joe_Barry Thanks for your contribution on this thread.

Hi @Merle ,

You can create a measure as below to get it, please find the details in the attachment.

WOW = 
VAR _pcdate =
    SELECTEDVALUE ( 'Table'[Purchase Complete] )
VAR _category =
    SELECTEDVALUE ( 'Table'[Category] )
VAR _predate =
    CALCULATE (
        MAX ( 'Table'[Purchase Complete] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = _category
                && 'Table'[Purchase Complete] < _pcdate
        )
    )
VAR _prevalue =
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = _category
                && 'Table'[Purchase Complete] = _predate
        )
    )
RETURN
    DIVIDE ( SUM ( 'Table'[Sales] ) - _prevalue, _prevalue )  

vyiruanmsft_0-1713418698168.png

Best Regards

View solution in original post

 
Thank you very much v-yiruan-msft

Solution works.

View solution in original post

7 REPLIES 7
Merle
Frequent Visitor

Hi Joe,

Thanks for your response. Dax Formula used is giving the same value as the date column not the difference between the column dates of the previous. Is there a different way to format this formula? Thank you.

Capture.PNG

Anonymous
Not applicable

@Joe_Barry Thanks for your contribution on this thread.

Hi @Merle ,

You can create a measure as below to get it, please find the details in the attachment.

WOW = 
VAR _pcdate =
    SELECTEDVALUE ( 'Table'[Purchase Complete] )
VAR _category =
    SELECTEDVALUE ( 'Table'[Category] )
VAR _predate =
    CALCULATE (
        MAX ( 'Table'[Purchase Complete] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = _category
                && 'Table'[Purchase Complete] < _pcdate
        )
    )
VAR _prevalue =
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Category] = _category
                && 'Table'[Purchase Complete] = _predate
        )
    )
RETURN
    DIVIDE ( SUM ( 'Table'[Sales] ) - _prevalue, _prevalue )  

vyiruanmsft_0-1713418698168.png

Best Regards

Hi @Anonymous,

Thank you again for your solution to my previous question. 

I have encountered an issue in finding the Conversion rate (CR) of two measures between dates. Can you please assist me with this?

CR Formula = Upgrade / Signups

Expected results:

Capture 1.PNG

 

I have tried your dax formula with a slight modification:

Capture.PNG

 

This is my result, it is only calculating the first date between Upgrade and Signups.

 

InkedCapture_LI.jpg

 

 

Merle
Frequent Visitor

Found a Solution to this

Merle
Frequent Visitor

Found a solution to this.

 
Thank you very much v-yiruan-msft

Solution works.

Joe_Barry
Solution Sage
Solution Sage

Hi @Merle 

 

Maybe this will help?  https://community.fabric.microsoft.com/t5/Desktop/WoW-trend-calculation/m-p/533645/highlight/true#M2...

 

Thanks

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn


Let's connect on LinkedIn


Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.