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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors