Forum Discussion

Brycert's avatar
Brycert
Icon for Resolver I rankResolver I
4 years ago
Solved

Getting additional attributes from TOPN measure returns dreaded "Exceeded resources error"

Greetings all,   I have a very simple model:       What I am wanting to do is calculate Claims Count of Claims Paid (a measure) against the TOP 10 NDCs that are in the DrugInformation tab...
  • Brycert's avatar
    4 years ago

    I found the issue, the values clause should contain the whole table in the Calculate function:

     

    Top 10 NDC Claim Count Paid = var ranking = VALUES(DrugInformation[NDC]) return CALCULATE(Claim_Measures[Count of Claims Paid], TOPN(10,ALL(DrugInformation),Claim_Measures[Count of Claims Paid], DESC), ranking)