Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello All,
I have the data of suppliers, where I have highlighted the minimum price from each supplier as below.
S1 | S2 | S3 | |||||
Model | Desc | qty | price | qty | price | qty | price |
A | AAAA | 20 | $30.00 | 7 | $29.00 | 80 | $23.00 |
B | BBBB | 200 | $25.00 | 30 | $19.00 | 100 | $20.00 |
C | CCCC | 155 | $29.00 | 300 | $31.00 | 120 | $35.00 |
D | DDDD | 0 | $22.00 | 600 | $25.00 | 300 | $27.00 |
On the next page. I want to get the data of suppliers whose, price is minimum and qty is greater than 0. (if the qty is zero I need to get the next minimum price).
Model | Desc | qty | price | Supplier |
A | AAAA | 80 | 23 | S3 |
B | BBBB | 30 | 19 | S2 |
C | CCCC | 155 | 29 | S1 |
D | DDDD | 600 | 25 | S2 |
Please let me know how can I do this.
Solved! Go to Solution.
Hi @AbbasG
Assume your original table is like below
You can create the following measures. Display these measures in a table or matrix visual.
New Price = MINX(FILTER('Table','Table'[Qty] > 0),'Table'[Price])
New Qty =
VAR _price = [New Price]
RETURN
MAXX(FILTER('Table','Table'[Price] = _price),'Table'[Qty])
New Supplier =
VAR _price = [New Price]
RETURN
MAXX(FILTER('Table','Table'[Price] = _price),'Table'[Supplier])
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @AbbasG
Assume your original table is like below
You can create the following measures. Display these measures in a table or matrix visual.
New Price = MINX(FILTER('Table','Table'[Qty] > 0),'Table'[Price])
New Qty =
VAR _price = [New Price]
RETURN
MAXX(FILTER('Table','Table'[Price] = _price),'Table'[Qty])
New Supplier =
VAR _price = [New Price]
RETURN
MAXX(FILTER('Table','Table'[Price] = _price),'Table'[Supplier])
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@v-jingzhang thank you so much for taking your time and assisting. It really helped me in getting the job done.
@AbbasG
How is your data organized, is it as follows?
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
100 | |
65 | |
44 | |
36 | |
36 |