Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello together,
i need help on a measure to calculate a quote. I have a table like this:
To get the quote i need the distinctcount article where the invoicetype is "nachorder". This is no problem
Hi @morizf
I suggest to create a calculated column to exclude values first:
IsValid Column = 
IF (
    CALCULATE (
        COUNTROWS(MyTable),
        ALLEXCEPT ( MyTable, MyTable[Article])
    )
        <> CALCULATE(COUNTROWS(MyTable), ALLEXCEPT(MyTable, MyTable[Article], MyTable[invoicetype])),
    FALSE(),
    IF (
        CALCULATE (
            VALUES ( MyTable[invoicetype] ),
            ALLEXCEPT ( MyTable, MyTable[Article], MyTable[invoicetype] )
        )
            <> "nachorder",
        FALSE(),
        TRUE ()
    )
)
And later on, count over this column:
Measure = CALCULATE(DISTINCTCOUNT(MyTable[Article]),MyTable[IsValid Column]=TRUE()) 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 13 | |
| 11 | |
| 10 | |
| 9 |