Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I'm trying to figure out a way to lookup a max value from the BP column to match with a name (Comm ID). When I do lookup value, I just get to notification that there are multiple values which is an issue I anticipated.
Ultimately, what I would want is for any row with A5 as the Comm ID to have 3 as a max value while any row with B6 as the Comm ID to have 4 as its Max value.
Is there any way to pull this off?
BP | Comm ID | Max Value |
1 | A5 | |
2 | A5 | |
3 | A5 | |
1 | B6 | |
4 | B6 |
Solved! Go to Solution.
Hi,
Try this calculated column formula
=CALCULATE(MAX(DATA[BP]),FILTER(DATA,DATA[COMM ID]=EARLIER(DATA[COMM ID])))
Hope this helps.
Hi @schristian ,
If i understand you correctly, ALLEXCEPT() function might be helpful for you.
You can use the formula below both in Measure and Calculated Column.
Max Value = CALCULATE(MAX('Table'[BP]),ALLEXCEPT('Table','Table'[Comm ID]))
Result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi all - thanks for everyones suggestions. I think I should've included that sometimes the BP column is blank. All of the suggestions returned a 0 value. Could the blanks be a cause?
Hi @schristian ,
Based on my research, I don't think the blank value could affect the result of my formula.
It would be better to share your pbix or sample data to us if you don't have any Confidential Information. In that case we might help you find out what caused the results return 0 values.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You are welcome. Blanks should not be the reason for my formula not working. See the screenshot below.
@Ashish_Mathur Noticed I made an error elsewhere and your solution worked. Appreciate everyone's help with this!
HI @schristian ,
May be you can give a try with this:
Hi,
Try this calculated column formula
=CALCULATE(MAX(DATA[BP]),FILTER(DATA,DATA[COMM ID]=EARLIER(DATA[COMM ID])))
Hope this helps.
HI @schristian ,
You may go thru this solution for the lookup value error.
Or you can try this measure for your issue:
May be this helps.
Thanks,
Tejaswi
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |