Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
109 | |
108 | |
93 | |
61 |
User | Count |
---|---|
171 | |
139 | |
133 | |
102 | |
86 |