Forum Discussion
Brycert
Resolver I
4 years agoGetting 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...
- 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)
Brycert
Resolver I
4 years agoI 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)