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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
adityavighne
Continued Contributor
Continued Contributor

Dynamic Date prior period value

Hi,

 

I have date slicer and I want prior period value.

1.PNG

 

suppose I select 15-31 January date range then I want prior period sum value from 1-14 January.

 

A need the sum of (column A, column B, column C) 1-14 January

1 ACCEPTED SOLUTION

Hi @adityavighne 

You may drag only the date column and measure to the visual.

1.png

Regards,

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

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

@adityavighne - It should be possible, but you need to clearly define the rule in order to modify the filter context. Is this the rule?:

1. Find the minimum date.

2. Find the month for that date.

3. Filter on only dates that are before the minimum date and within the same month.

Cheers!

Nathan

Can I get DAX for this ...what I wrote is giving the only month before data.

Hi @adityavighne 

You may create a calendar table and use below measure.Attached sample file for your reference.

Measure = 
CALCULATE (
    SUM ( Data[Column1] ) + SUM ( Data[Column2] )
        + SUM ( Data[Column3] ),
    FILTER (
        Data,
        Data[Date] < MIN ( 'Calendar'[Date] )
            && MONTH ( Data[Date] ) = MONTH ( MIN ( 'Calendar'[Date] ) )
    )
)

Regards,

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

This measure showing blank value

Hi @adityavighne 

You may drag only the date column and measure to the visual.

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @adityavighne ,

 

I think, prior period date range is not possible, only for a single date is possible.

Like, if you select January 2019,
can get the previous month, means December 2018 or
can get the current month last year, means January 2018.

 

Regards,

Pavan Vanguri.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.