cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mohammedkhan Regular Visitor
Regular Visitor

Display the last price of each product (earch Product Last Price is different)

Dear All,

 

I would like to display the recent dollar price from the table for each country there are 240 countriesRDP.PNG

I have added a column with mention below DAX 

 

RDP = CALCULATE(TOPN(1,'Dollar Data','Dollar Data'[dollar_price],DESC,'Dollar Data'[Date].[Date],DESC))
1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Display the last price of each product (earch Product Last Price is different)

@mohammedkhan 

 

Give this a shot

 

RDP =
MINX (
    TOPN (
        1,
        FILTER (
            'Dollar Data',
            'Dollar Data'[Country_Code] = EARLIER ( 'Dollar Data'[Country_Code] )
        ),
        'Dollar Data'[Date], DESC
    ),
    'Dollar Data'[dollar_price]
)

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Display the last price of each product (earch Product Last Price is different)

@mohammedkhan 

 

Give this a shot

 

RDP =
MINX (
    TOPN (
        1,
        FILTER (
            'Dollar Data',
            'Dollar Data'[Country_Code] = EARLIER ( 'Dollar Data'[Country_Code] )
        ),
        'Dollar Data'[Date], DESC
    ),
    'Dollar Data'[dollar_price]
)

View solution in original post

mohammedkhan Regular Visitor
Regular Visitor

Re: Display the last price of each product (earch Product Last Price is different)

Thank you Zubair,
This is indeed a great help, there will be more queries may i post them onto the forum.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 153 members 1,970 guests
Please welcome our newest community members: