Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
I guess you are just trying to have in a card visual the count of the days that have scores less than 0.8?
if this is the case please try
Low Score =
SUMX (
DISTINCTCOUNT ( 'Table'[Date] ),
IF ( CALCULATE ( SUM ( 'Table'[Score] ) ) < 0.8, 1 )
)
Hi @tamerj1,
this is the error I get when I use your formula: The SUMX function expects a table expression for argument '1', but a string or numeric expression was used.
@kmartink
Apologies, my mistake
Low Score =
SUMX (
DISTINCT ( 'Table'[Date] ),
IF ( CALCULATE ( SUM ( 'Table'[Score] ) ) < 0.8, 1 )
)
Hi @kmartink
make sure you have created a measure not a calculated column by mistake
Hi @tamerj1,
yes what I've created is a measure. I was wondering if the problem might be caused either by that the formula accidentally summarizes all the rows of the "Score" column which would mean the result would be always higher than 80% and so the zero will be displayed? Or either that my "Score" has the Data type "decimal number" and the format "percentage" but the formula uses "0.8" for 80%?
Is there any other way how to rewrite the formula so it might not be accidentally summing up all the rows of the column "Score" if that's the case what's happening right now? I already tried to use "AVERAGE" instead of "SUM" but there wasn't any difference. Thanks.
@kmartink
Would you please present sample fo the data and perhaps a screenshot of the visual?
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |