Forum Discussion
DuncanYeah
Helper III
1 year agoShow Zero in table
Hi everyone, I am trying to get my table to display categories with number count zero. I had tried to use +0 but after appling page filter, the table showed some categories that not match the pa...
- 1 year ago
Hi Anonymous
Thx for your reply.
I change the code a little bit and it works.
Code:
Sum_income = var x = SUM(I_table[Income]) var _P_CatList = CALCULATETABLE(VALUES(P_table[P_Cat]),FILTER(I_table,I_table[Project type] IN VALUES(I_table[Project type]))) return IF(MAX(P_table[P_Cat]) in _P_CatList,x,x+0 )Thank You.
Best Regards,
Duncan
Anonymous
1 year agoNot applicable
Hi DuncanYeah ,
You can try this code to create a measure.
Sum_income =
var x = SUM(I_table[Income])
var _P_CatList = CALCULATETABLE(VALUES(P_table[P_Cat]),FILTER(I_table,I_table[Project type] IN VALUES(I_table[Project type])))
return
IF(MAX(P_table[P_Cat]) in _P_CatList,x+0,x)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DuncanYeah
Helper III
1 year agoHi Anonymous
Thx for your reply.
I change the code a little bit and it works.
Code:
Sum_income =
var x = SUM(I_table[Income])
var _P_CatList = CALCULATETABLE(VALUES(P_table[P_Cat]),FILTER(I_table,I_table[Project type] IN VALUES(I_table[Project type])))
return
IF(MAX(P_table[P_Cat]) in _P_CatList,x,x+0
)Thank You.
Best Regards,
Duncan