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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
SunilMauryaPBI
Frequent Visitor

How to implement AGO in POWER BI

Hi, 

I need help to understand how i can implement AGO type measures in POWER BI.

I need to display conversion price for yyyy/mm selected by user along with its values 1 month back, 3 month back, 6 month back and 12 month back. For example:-

If 2018/03 is slected, then row should look like this and I placed the model in below.Result set.PNGModel Con Rate.PNG

 

 

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @SunilMauryaPBI,

 

  1. Remove the relationship between 'Date Dimention' and 'Stock Price Fact'.
  2. Create calculated columns, for example, calculate the date one month ago. 1 month ago =
    DATEADD ( 'Date Dimention'[Calendar_Date], -1MONTH ). Set its format to "MMMM yyyy" under Format list in top ribbon.
  3. Add 'Date Dimention'[CAL_MONTH] to slicer. Add 'Stock Price Fact'[RWPORTING_PERIOD_ID] to table visual.
  4. Create measures:
    Selected value of 1 month ago =SELECTEDVALUE ( 'Date Dimention'[1 month ago] )
    
    % Mov 1 Month Ago =
     (
        CALCULATE (
            [Sum value],
            FILTER (
                'Stock Price Fact',
                YEAR ( 'Stock Price Fact'[EFFDATE] ) = YEAR ( [Selected value of 1 month ago] )
                    && MONTH ( 'Stock Price Fact'[EFFDATE] )
                        = MONTH ( [Selected value of 1 month ago] )
            )
        )
            - [Sum value]
    )
        / [Sum value]

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SunilMauryaPBI
Frequent Visitor

Any help will be appreciated? I want 4 measures to be in place like

Stock price 1 month ago

Stock price 3 month ago

Stock price 6 month ago

Stock price 12 month ago

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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