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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Stuznet
Helper V
Helper V

Freeze The Previous Data Trend Bar Graph

Hi all,

 

I've been googling around how to lock or freeze the previous month trend data on the Bar Graph but no avail. 

 

What I want is freeze Actual in January, so the next cycle when I refresh the report will not impact the previous month (January)

 

Capture.PNG

I've created a dummy report

 

I appreciated your help.

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @Stuznet ,

 

I modify your actual measure to add a condition to break calculation and grouped by current month name:

Actual =
VAR Test =
    CALCULATE (
        SUM ( Data[Unit Cost] ),
        FILTER ( ALLSELECTED ( Data ), Data[Month Num] <= MAX ( Data[Month Num] ) ),
        VALUES ( Data[Month] )
    )
RETURN
    IF ( MAX ( Data[Month Num] ) + 1 <= MONTH ( TODAY () ), Test, BLANK () )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft,

 

Thank you for working on this for me, so, in theory, the measure you created it should stop adding the number to January when I refresh for the next cycle, is that right?

Capture.PNG

Hi @Stuznet ,

 

This formula will calculate until previous month of current date and they will filter by its row contents month.

65.gif

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft 

 

Unfortunately, the method you provided doesn't work, it looks like changing the +1 <= Month more like masking them or hide it. So, I appended the data from last month and added a Saved Date column. 

Capture.PNG

 

I tried it this way, but I'm not getting any result.

 

Actual 2 = 
VAR Test =
    CALCULATE (
        [Actual],
        FILTER ( ALLSELECTED ( Data ), Data[Order Month Num] <= MAX ( Data[Order Month Num] ) ),
        VALUES ( Data[Saved Month] )
    )
RETURN
    IF ( MAX ( Data[Saved Month Num] ) + 1 <= MONTH ( TODAY () ), Test, BLANK () )

So,

January Actual, the Saved Date would be 2/1/2019.

February Actual, the Saved Date would be 3/12019.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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