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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.