Forum Discussion

DataNinja777's avatar
DataNinja777
Super User
2 years ago
Solved

Maximum range below every 1000

Hello Power BI community,   I've writte a measure below which produced the range of journal entry row numbers as shown in the 2nd screen shot.  Further to this, I'd like to identify the maximum num...
  • Ahmedx's avatar
    Ahmedx
    2 years ago

    try writing it like this

     

    r Maxlndex:=VAR TablelndexPerAP =
    SUMMARIZE ('Journal Entry',
    'Journal Entry'[Reference],
    "Max Index", MAX ('Journal Entry'[lndex])
    )
    RETURN
    MAXX(
    TOPN(
    1,
    FILTER (TablelndexPerAP, [Max Index] < 1000),
    [Max Index], DESC),
    [Max Index]))
    ==================or=======
    r Maxlndex:=VAR TablelndexPerAP =
    SUMMARIZE (ALL('Journal Entry'),
    'Journal Entry'[Reference],
    "Max Index", MAX ('Journal Entry'[lndex])
    )
    RETURN
    MAXX(
    TOPN(
    1,
    FILTER (TablelndexPerAP, [Max Index] < 1000),
    [Max Index], DESC),
    [Max Index]))