Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Sorry if I put this at the wrong place, or something is unclear, I'm a newbie.
I also couldn't find a similar problem unfortunately.
Problem explanation:
I am trying to write a measure that will return the sum of certain values based on two columns.
Below you can see how the data is formatted. In this dataset there are two (but could later be more) unique references, I want to sum the cost of the highest recommendations (based on the number in that cell: "recommendation 3:"). So it would take just one value per reference to sum. In this case the measure should sum the 1000 and the 1500 since they respectively have the highest recommendation number of this dataset.
I tried adding a calculated column with just the recommendation number and then running the calculation with that. But I couldn't figure out how to make a measure that sum's based on these two conditions. (I did this within the power query by copying that column to create a new column and slicing it so i only keep the number). Unfortunately also with this I couldn't make it to work.
Curious if this is possible and how I could approach this best, I am looking forward to your feedback!
Thanks a lot in advance and let me know if something is unclear 😉
Some sample data to visualize it:
Reference | Recommendations | cost |
1404BC_20_ | recommendation 1: lorem itsem | 500 |
1404BC_20_ | recommendation 2: lorem itsem | 850 |
1404BC_20_ | recommendation 3: lorem itsem | 1000 |
6308EC_24_ | recommendation 1: lorem itsem | 400 |
6308EC_24_ | recommendation 2: lorem itsem | 900 |
6308EC_24_ | recommendation 3: lorem itsem | 1100 |
6308EC_24_ | recommendation 4: lorem itsem | 1500 |
Solved! Go to Solution.
sumx(values([Reference),calculate(max[cost)) = 1500+1000=2500
That was easier than I expected. Thanks a lot!
sumx(values([Reference),calculate(max[cost)) = 1500+1000=2500
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |