Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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())
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |