Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a measure below but I dont want to calculate blanks as 0
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, for row is blank(), its default type is Text and cannot be judged directly, you need to use the isblank function. I made a modification, the reference is as follows:
c =
IF ( 'BSCA Attendance'[HT1] = 0, 100, 0 )
+ IF ( 'BSCA Attendance'[HT2] = 0, 100, 0 )
+ IF ( ISBLANK ( 'BSCA Attendance'[HT3] ), 100, 0 )
+ IF ( 'BSCA Attendance'[HT4] = 0, 100, 0 )
+ IF ( 'BSCA Attendance'[HT5] = 0, 100, 0 )
+ IF ( ISBLANK ( 'BSCA Attendance'[HT6] ), 100, 0 )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, for row is blank(), its default type is Text and cannot be judged directly, you need to use the isblank function. I made a modification, the reference is as follows:
c =
IF ( 'BSCA Attendance'[HT1] = 0, 100, 0 )
+ IF ( 'BSCA Attendance'[HT2] = 0, 100, 0 )
+ IF ( ISBLANK ( 'BSCA Attendance'[HT3] ), 100, 0 )
+ IF ( 'BSCA Attendance'[HT4] = 0, 100, 0 )
+ IF ( 'BSCA Attendance'[HT5] = 0, 100, 0 )
+ IF ( ISBLANK ( 'BSCA Attendance'[HT6] ), 100, 0 )
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Add the following code as a new column to get the desired results.
HTPTS =
COUNTROWS(
FILTER(
{ 'BSCA Attendance'[HT1] ,'BSCA Attendance'[HT2] , 'BSCA Attendance'[HT3], 'BSCA Attendance'[HT4], 'BSCA Attendance'[HT5], 'BSCA Attendance'[HT6] },
NOT ([Value] == BLANK()) && [Value]=0
)
) * 100
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |