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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ngct1112
Post Patron
Post Patron

New measure according by Rank(DAX)

Hi,

 

I am struggling on creating a table which I hope I could seek some helps here. I have upload my BI Sample here.

In my simpified model, I have 2 measures:

1,) Price_FX

2.) 

 

Rank(Measure) = 
RANKX(
    FILTER(
        ALLSELECTED('Table'[ID],'Table'[Supplier]),
        'Table'[ID] = MAX('Table'[ID])),
        [Price_FX(measure)],,ASC)

 

With my Original Data:

ProjectIDSupplierPrice(measure)
BI-20211D15.6
BI-20211B31.2
BI-20211C62.4
BI-20211A15.6
BI-20212A93.6
BI-20212B46.8
BI-20212C39

I am hoping I could create a table like the below.





ngct1112_1-1626770284801.png

 

Appreciated if I could help some helps!

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ngct1112 , create a table using generate series

 

Bucket = generateseries(1,4,1)

 

measure =

var _tab = addcolumns(summarize('Table','Table'[ID],'Table'[Supplier]), "Rank",[Rank(Measure)], "_1",[[Price_FX(measure)])
return
maxx(filter(_tab, [Rank] = max(bucket[Value])),[_1])

 

Take max for supplier, or create a measure like above. Use bucket value in column in matrix

View solution in original post

2 REPLIES 2
ngct1112
Post Patron
Post Patron

@amitchandak Thanks for your help again!

amitchandak
Super User
Super User

@ngct1112 , create a table using generate series

 

Bucket = generateseries(1,4,1)

 

measure =

var _tab = addcolumns(summarize('Table','Table'[ID],'Table'[Supplier]), "Rank",[Rank(Measure)], "_1",[[Price_FX(measure)])
return
maxx(filter(_tab, [Rank] = max(bucket[Value])),[_1])

 

Take max for supplier, or create a measure like above. Use bucket value in column in matrix

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.