Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Good afternoon Power BI Community,
I’m having a problem with a column. Let’s say I have a table with two columns. One that lists Invoice Number, and another that lists Color. I want to create a column that labels them all one value if a certain value is present.
In this case, if "blue" is ever mentioned in assocaition with an Invoice Number, I want a column that repeats "blue" for all lines associated with the invoice number.
EX:
| Invoice Number | Color | desired output |
| 123 | red | blue |
| 123 | red | blue |
| 456 | red | red |
| 123 | blue | blue |
Any help would be greatly appreciated!
Solved! Go to Solution.
Hi,
This calculated column formula works
=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Invoice Number]=EARLIER(Data[Invoice Number])&&Data[Color]="Blue"))>0,"Blue"
,Data[Color])
Hope this helps
Hi,
This calculated column formula works
=if(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Invoice Number]=EARLIER(Data[Invoice Number])&&Data[Color]="Blue"))>0,"Blue"
,Data[Color])
Hope this helps
Works! Thank you!
You are welcome.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 52 | |
| 50 | |
| 34 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 77 | |
| 41 | |
| 26 | |
| 25 |