The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Goodday,
I want to calculate an average in a column which has blank values.
Basically i want the formula to only count the rows with values and ignores the ones that don't.
Solved! Go to Solution.
Hi @RvdHeijden,
You can create a measure using the formula as follows, then you can create a card visual to display the result.
average = DIVIDE ( CALCULATE ( SUM ( Table[column] ), ALL ( Table ) ), CALCULATE ( COUNT ( Table[Column] ), Table[Column] <> BLANK () ) )
Please replace the 'Table' and 'column' name as your table name and column name.
Best Regards,
Angelia
Hi @RvdHeijden,
You can create a measure using the formula as follows, then you can create a card visual to display the result.
average = DIVIDE ( CALCULATE ( SUM ( Table[column] ), ALL ( Table ) ), CALCULATE ( COUNT ( Table[Column] ), Table[Column] <> BLANK () ) )
Please replace the 'Table' and 'column' name as your table name and column name.
Best Regards,
Angelia
User | Count |
---|---|
70 | |
67 | |
62 | |
48 | |
28 |
User | Count |
---|---|
113 | |
80 | |
64 | |
55 | |
43 |