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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
saurabh_kedia_
Microsoft Employee
Microsoft Employee

Calculate maximum amount as per date & map the respective amount as per primary key

 

Hi folks,

 

Need some help on this one!

 

I'm trying to map the amount against name by date preference between two tables.

 

For e.g. tables sale_data & Master_ID is connected on alias/Name (many to one relationship).

I need amount 2100 (as this is the amount aginst latest date) from table sale_data mapped to master_id table.

Moreover, the same should be available as column in data view.

 

Capture.PNG

Please feel free to reach out to me in case any more clarification is required.

 

Regards,

Saurabh Kedia

 

1 ACCEPTED SOLUTION

Hi @saurabh_kedia_

 

You don't want to get the result by creating measures,right? Maybe you may try to use 'Group by' function in Query Editor and then use 'Merge Queries' to get the table as requested.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
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

4 REPLIES 4
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @saurabh_kedia_

 

You may add a rank measure first. Then you can get the latest amount as below:

Rank =
RANKX ( ALLEXCEPT ( Sale, Sale[Alias] ), CALCULATE ( MAX ( Sale[date] ) ) )
LatestAmount =
CALCULATE ( SUM ( Sale[amount] ), FILTER ( Sale, [Rank] = 1 ) )

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherch,

 

Thanks a lot for your inputs!

 

Actually, I knew this method.

I was to find a way to directly get the desired value.

 

Regards,

Saurabh 

Hi @saurabh_kedia_

 

You don't want to get the result by creating measures,right? Maybe you may try to use 'Group by' function in Query Editor and then use 'Merge Queries' to get the table as requested.

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherch,

 

Thanks for you inputs.

 

Regards,

Saurabh

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors