Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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]))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |