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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I got an invoice table listing all its items, I need a calculated column to identify whether the invoice contains only a SINGLE or MIXED category based on the category column. Below is the sample and the desired output for the status column.
Thanks for all the help.
| INVOICE NUMBER | ITEM | CATEGORY | STATUS |
| 48456558 | TEA | BEVERAGE | SINGLE |
| 48456558 | SODA | BEVERAGE | SINGLE |
| 48456558 | SODA | BEVERAGE | SINGLE |
| 48456558 | JUICE | BEVERAGE | SINGLE |
| 48459124 | SODA | BEVERAGE | MIXED |
| 48459124 | JUICE | BEVERAGE | MIXED |
| 48459124 | CANDY | CONFECTIONARY | MIXED |
| 48459124 | CHEESE | DAIRY | MIXED |
| 48459124 | SODA | BEVERAGE | MIXED |
| 48461354 | CHEESE | DAIRY | SINGLE |
| 48461354 | BUTTER | DAIRY | SINGLE |
Solved! Go to Solution.
HI @jrpoli2000
Try this
Status =
IF (
CALCULATE (
DISTINCTCOUNT ( Table1[CATEGORY] ),
ALLEXCEPT ( Table1, Table1[INVOICE NUMBER] )
)
> 1,
"MIXED",
"SINGLE"
)
HI @jrpoli2000
Try this
Status =
IF (
CALCULATE (
DISTINCTCOUNT ( Table1[CATEGORY] ),
ALLEXCEPT ( Table1, Table1[INVOICE NUMBER] )
)
> 1,
"MIXED",
"SINGLE"
)
Thanks again!!!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |