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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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