This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I'm trying to create a measure where I can reference a pre-filtered value. It will end up being a %, but for simplicity:
Measure = CALCULATE(DISTINCTCOUNT('TABLE'[Value]),FILTER('TABLE','TABLE'[VALUE] (is not blank)
I just need a count of the value when it is not blank/without nulls. I've tried:
TABLE [VALUE] =ISBLANK(FALSE), =ISEMPTY(FALSE), = <> BLANK(), etc.
You guys have been a great help before. Help me again? Thanks
Solved! Go to Solution.
Measure =
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'TABLE'[Value] ),
FILTER ( 'TABLE', 'TABLE'[VALUE] <> BLANK () )
),
DISTINCTCOUNT ( 'TABLE'[VALUE] ),
0
)
How about this...
Measure =
CALCULATE (
DISTINCTCOUNT ( 'TABLE'[Value] ),
FILTER ( 'TABLE', 'TABLE'[VALUE] <> BLANK () )
)
That gives the correct value. When I try to make it a %, however,
Measure =
CALCULATE (DISTINCTCOUNT ( 'TABLE'[Value] ), FILTER ( 'TABLE', 'TABLE'[VALUE] <> BLANK () ) )
/ DISTINCTCOUNT('TABLE'[VALUE])),
(i.e. dividing the filtered value by its unfiltered self), it gives me
"A function FILTER has been used in a True/False expression that is used as a table filter expression. This is not allowed."
Measure =
DIVIDE (
CALCULATE (
DISTINCTCOUNT ( 'TABLE'[Value] ),
FILTER ( 'TABLE', 'TABLE'[VALUE] <> BLANK () )
),
DISTINCTCOUNT ( 'TABLE'[VALUE] ),
0
)
Hello,
I have a little question: why is the Filter function applied while the Calculate function itself has a filter?
That did it. Thanks for making the formatting clear - it was easy to follow the logic.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 35 | |
| 28 | |
| 22 | |
| 21 |