Forum Discussion
sabd80
Helper IV
2 years agoDAX flag the first occurrence
Hi, I have below data, I would like to create a calculated column (Rank) to flag only one record with 1 for a supplier that have multiple lines with the same date. for example, supplier 12345 has 9...
- 2 years ago
Hi sabd80
You can achieve this by creating an index column, Hope the below pattern fullfuils your requirementP.S. calculated columns can degrade your report performance.
If my answer fulfills your requirement then please mark my post as solution.
Thanks
Tharun
amitchandak
Super User
2 years agosabd80 , You create a measure using new rownumber function
ROWNUMBER(ALLSELECTED(Table[supplier id], Table[Date]),ORDERBY([Date],DESC),LAST,partitionBy(Table[supplier id]) )
Power BI - New DAX Function: Rownumber- https://www.youtube.com/watch?v=yS9-IQjUDwg&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L&index=1
- sabd802 years ago
Helper IV
this one is not working, it return 1 for all the 9 records.