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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
MohamadAshuryan
Frequent Visitor

How can I get the uniqe list off Last occurred for each category?

Hi every one.

 

I have this list:

 

products---Prices

product1---1000

product2---2000

product1---900

product3---4000

product2---5000

product3---6000

 

and I wand to get the uniqe list off Last prices for each products with DAX Like this:

 

products---Prices

product1---900

product2---5000

product3---6000

 

 

1 ACCEPTED SOLUTION

Sorry Mohammad,

It was too late last night I didn't see your reply. Here is a sample file with the solution https://we.tl/t-rBJAfyJOu4

1.png

Last Price = 
VAR MaxIndex = MAX ( Products[Index] )
RETURN
    CALCULATE ( 
        MAX ( Products[Prices] ),
        Products[Index] = MaxIndex
    )

View solution in original post

9 REPLIES 9
tamerj1
Super User
Super User

@MohamadAshuryan 

Can't you add index column using Power Query?

How can I do that?

Sorry Mohammad,

It was too late last night I didn't see your reply. Here is a sample file with the solution https://we.tl/t-rBJAfyJOu4

1.png

Last Price = 
VAR MaxIndex = MAX ( Products[Index] )
RETURN
    CALCULATE ( 
        MAX ( Products[Prices] ),
        Products[Index] = MaxIndex
    )

Thank you very much tamerj1.

@MohamadAshuryan 

open the query editor. From the add columns tab select add index column. 

So what shoud I do next?

tamerj1
Super User
Super User

Hi @MohamadAshuryan 

do you have index or date column?

Hi tamerj1,

No, Suppose we have only these two columns.

@MohamadAshuryan 

Then the required result is not possible 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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