Forum Discussion

Saxon10's avatar
Saxon10
Icon for Post Prodigy rankPost Prodigy
2 years ago
Solved

Index and MIN value based on the two tables

Hi, I have two tables are data and report. "The data table contains the 'Area' and 'Priority' columns. The Report table contains columns such as 'Item,' 'Area,' and 'Priority'. If an item has mul...
  • Ashish_Mathur's avatar
    2 years ago

    Hi,

    This problem can be solved without the second table.  Use these calculated column formulas

    Minimum priority number = CALCULATE(MIN(REPORT[Priority]),FILTER(REPORT,REPORT[Item]=EARLIER(REPORT[Item])))
    Area of minimum priority = CALCULATE(MAX(REPORT[Area]),FILTER(REPORT,REPORT[Item]=EARLIER(REPORT[Item])&&REPORT[Priority]=EARLIER(REPORT[Minimum priority number])))

    Hope this helps.