Forum Discussion

DuncanYeah's avatar
DuncanYeah
Helper III
1 year ago
Solved

Show 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 page filter condition.

 

Anyone know anyways to solve this problem.

Thank You.

 

Best Regards,

Duncan

 

  • 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

     

14 Replies

  • Hi DuncanYeah 
    It is highly likely that a manipulation within the DAX formula can be implemented to preserve the filters as well.
    To provide further assistance, access to the data and a clear understanding of the desired outcome are necessary.

    you please provide some raw data in your tables (exclude sensitive data) with Text (not a screenshot) format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

    How to provide sample data in the Power BI Forum

    And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly