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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
analyst_514
Regular Visitor

Previous Measure

Hi
I am trying to return previous year quarter value but only for one value it is not returning other than that everything is showing correct 

analyst_514_0-1739530281691.png

Hi I am trying to fix promote prev measure the logic is it should take values from previous year quarter
For example 2025/q4 is 8772498 that value is showing 2026/q4 but 2027 q4 16538747 is not showing 2028/q1 

and it is segregated as tax distribution and promote values 

I am pasting expected output

analyst_514_1-1739530450090.png


I am pasting the dax which i used to achive this promote prev

Promote curr = CALCULATE(MAX('Promote Breakdown'[Promote (incl Tax Advances) new]))
Promote Prev =

VAR PrevValue =
    CALCULATE(
        [Promote curr],
        FILTER(
            ALL('Date'),
            'Date'[Period] < MAX('Date'[Period])
        )
    )
RETURN
    IF(
        ISBLANK(PrevValue),
        0,
        PrevValue
    )
VAR PrevValue =
    CALCULATE(
        MAX('Promote Breakdown'[Promote (incl Tax Advances)]),
        FILTER(
            ALL('Date'),
            'Date'[Period] < MAX('Date'[Period])
        )
    )
RETURN
    IF(
        ISBLANK(PrevValue),
        0,
        PrevValue
    )


Hi guys please suggest the issues or kindly help me to achive this 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @analyst_514 

Based on your description, I've created the following sample data:

vjianpengmsft_0-1739778982701.png

Create the following three measures:

Promote cuff measure = SUM('Table'[Promote cuff])
Promote prev = 
CALCULATE([Promote cuff measure],OFFSET(-1,ALLSELECTED('Table'[Year Quarter],'Table'[Tax distribution])))
Promote diff = [Promote cuff measure] - [Promote prev]

Put it in the table visual:

vjianpengmsft_1-1739779071052.png

 

 

Best Regards

Jianpeng Li

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

3 REPLIES 3
Anonymous
Not applicable

Hi, @analyst_514 

Based on your description, I've created the following sample data:

vjianpengmsft_0-1739778982701.png

Create the following three measures:

Promote cuff measure = SUM('Table'[Promote cuff])
Promote prev = 
CALCULATE([Promote cuff measure],OFFSET(-1,ALLSELECTED('Table'[Year Quarter],'Table'[Tax distribution])))
Promote diff = [Promote cuff measure] - [Promote prev]

Put it in the table visual:

vjianpengmsft_1-1739779071052.png

 

 

Best Regards

Jianpeng Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bhanu_gautam
Super User
Super User

@analyst_514 , Try using

 

dax
Promote curr = CALCULATE(MAX('Promote Breakdown'[Promote (incl Tax Advances) new]))

Promote Prev =
VAR CurrentPeriod = MAX('Date'[Period])
VAR PreviousYearPeriod = CurrentPeriod - 4
VAR PrevValue =
CALCULATE(
[Promote curr],
FILTER(
ALL('Date'),
'Date'[Period] = PreviousYearPeriod
)
)
RETURN
IF(
ISBLANK(PrevValue),
0,
PrevValue
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi IT IS showing 0 for all feilds

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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