The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 table as well as the Claim table (1 To many from Claims to Druginformation). So this measure:
Solved! Go to Solution.
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)
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)
Let me also add that these "Drug Names" are not unique in the Drug Information table. But I wouldnt expect that to be an issue as the NDC corresponds to that exact Drug Name. Just an FYI however.
User | Count |
---|---|
25 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |