Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am Trying to get the "Code" which has maximum quntity or most Stock Qty in the table and should get filtered based Entity.
Table name : 'This month''s Stock Out'
Stock Qty | Month | Code | Supplier | Entity |
2 | 10 | BLR | AB | G2 |
2 | 10 | APAG | BC | G1 |
2 | 10 | PIO67 | BC | G1 |
0 | 10 | G2 | ||
1 | 10 | TR28G | CZ | G1 |
i tried below code but dont get filtered on the Entity.
Solved! Go to Solution.
@insandur , First Create a measure with help from a separate month table joined with month of your table
this month = calculate(Sum(Table[Stock Qty]), filter(all(Month), Month[Month] = max(Month[Month] )) )
TOP1 Name= CALCULATE([this month], TOPN(2,ALLSELECTED('Table'[Code]), [this month ] ,DESC), values('Table'[Code]))
@insandur , First Create a measure with help from a separate month table joined with month of your table
this month = calculate(Sum(Table[Stock Qty]), filter(all(Month), Month[Month] = max(Month[Month] )) )
TOP1 Name= CALCULATE([this month], TOPN(2,ALLSELECTED('Table'[Code]), [this month ] ,DESC), values('Table'[Code]))
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
9 |