Forum Discussion
setis
Post Partisan
6 years agoSimple FILTER calculation
Dear experts, I have Table1: Entry Doc Type DocNr 155511 2 1574028 155511 2 1574028 155511 2 1574028 155511 2 1574028 155511 3 15191 155511 3 15191 T...
- 6 years ago
Your data model should have Table 1 with joins to Table Sales (Table1.DocNr -->Table Sales.Sales DocNr) and Table Credit (Table1.Doc Nr --> Table Credit.DocNr) independent of each other.
From there, it should be fairly easy to create the measures:
- Sales = SUM(Table Sales.Amount)
- Credit = SUM(Table Credit.Amount)
Hope this helps!
- 6 years ago
Results based on the PBIX you provided...
amitchandak
Super User
6 years agoTry
Sales =
var _max = MAXX('Table1','Table1'[DocNr])
return
CALCULATE(
SUM('Sales'[Amount]);
FILTER('Sales';'Sales'[DocNr] =_max ))