Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello!!!
These are items that come from different manufacturers.
Each manufacturer offers a different discount for the purchase of their items.
We have a table with 4 columns: Item, manufacturer, item&manufacturer and discount.
You would need a 5th column where the purchase priority appears.
That is, product 105 is produced by 4 different manufacturers; From manufacturer 1 I can get 62% discount, from manufacturer 2, 60%, from manufacturer 3 40% and manufacturer 4 30%.
In case the same item has the same discount in different manufacturers the priority must be the same.
ARTICLE | MAKER | ART&MANUFACTURER | DISCOUNT | PRIORITY |
105 | 1 | 105 // 1 | 62 | 1 |
105 | 2 | 105 // 2 | 60 | 2 |
105 | 3 | 105 // 3 | 40 | 3 |
105 | 4 | 105 // 4 | 30 | 4 |
277 | 1 | 277 // 1 | 62 | 1 |
277 | 2 | 277 // 2 | 60 | 2 |
277 | 4 | 277 // 4 | 60 | 2 |
Thank you very much in advance for your help.
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
Priority measure: =
IF (
HASONEVALUE ( Data[ARTICLE] ),
RANKX (
FILTER ( ALL ( Data ), Data[ARTICLE] = MAX ( Data[ARTICLE] ) ),
CALCULATE ( SUM ( Data[DISCOUNT] ) ),
,
DESC
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your datamodel looks like, but please check the below picture and the attached pbix file.
Priority measure: =
IF (
HASONEVALUE ( Data[ARTICLE] ),
RANKX (
FILTER ( ALL ( Data ), Data[ARTICLE] = MAX ( Data[ARTICLE] ) ),
CALCULATE ( SUM ( Data[DISCOUNT] ) ),
,
DESC
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
78 | |
53 | |
38 | |
36 |
User | Count |
---|---|
100 | |
85 | |
47 | |
45 | |
44 |