Forum Discussion
Anonymous
4 years agoNot applicable
Invoice-lines
I'm new to PowerBI, so any help would be greatly appreciated! I have attached a table below as an example. Invoice ID Invoice line ID Category Wanted 1 1 A A 1 2 B A 1 3 A ...
- 4 years ago
Anonymous
You can add a calculated column to your table with this code.
Wanted = VAR _ACount = CALCULATE( COUNTROWS('Table'), 'Table'[Category]="A" ,ALLEXCEPT('Table','Table'[Invoice ID]) ) RETURN IF ( _ACount > 0, "A", "Not A")
jdbuchanan71
4 years agoSuper User
Anonymous
You can add a calculated column to your table with this code.
Wanted =
VAR _ACount =
CALCULATE(
COUNTROWS('Table'),
'Table'[Category]="A"
,ALLEXCEPT('Table','Table'[Invoice ID])
)
RETURN
IF ( _ACount > 0, "A", "Not A")
- Anonymous4 years agoNot applicable
It works perfectly. Your help is greatly appreciated, you saved me a lot of work. Thanks a lot!