March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |