Forum Discussion
Display only first column value in a table with duplicate values
- 5 years ago
hi Anonymous
If you want to create a measure, just try this measure
Measrue = var _firstrow=CALCULATE(MIN('Table'[productID]),ALLEXCEPT('Table','Table'[InvoiceID],'Table'[InvoiceAmount])) return CALCULATE(MIN('Table'[InvoiceAmount]),FILTER('Table','Table'[productID]=_firstrow))Result:
and here is sample pbix file, please try it.
Regards,
Lin
Anonymous , See if these measures can help
sumx(values(Table[InvoiceID]), min(Table[InvoiceAmount]))
sumx(values(Table[InvoiceID]),Firstnonblankvalue(productID, min(Table[InvoiceAmount])))
- Anonymous5 years agoNot applicable
Thank you for the quick reply amitchandak
I checked the suggested measures and both of them returned the same InvoiceAmount for each row:
InvoiceID productID Measure Measure 3 InvoiceAmount A0246605 item0010 999999 999999 999999 A0246605 Item0079 999999 999999 999999 A0246605 Item0081 999999 999999 999999 A0246605 Item0093 999999 999999 999999 A0246605 Item0166 999999 999999 999999 A0246605 Item0191 999999 999999 999999 A0246605 Item0102 999999 999999 999999 A0246605 Item0470 999999 999999 999999 A0246605 Item0001 999999 999999 999999 Measure "Measure" - sumx(values(Table[InvoiceID]), min(Table[InvoiceAmount]))
Measure "Measure 3" - sumx(values(Table[InvoiceID]),Firstnonblankvalue(productID, min(Table[InvoiceAmount])))
- Greg_Deckler5 years agoCommunity Champion
Anonymous Is there something to identify "First" like a date column or Index? Index would be good then it would be easy. Just find the MINX at that point. Basically a Lookup Min/Max. https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434