Forum Discussion

thmonte's avatar
thmonte
Icon for Helper IV rankHelper IV
8 years ago
Solved

Displaying 0's in a Matrix With Relationships

I have a matrix where I am displaying related locations + some calculations within.

 

In one of my calculations I sometimes get blank values and I would like these to be show as zeros but when I write a IF statement on the return it brings in ALL locations even if they have no data associated with it.

 

WITH IF DAX

 

 

WITHOUT IF DAX

 

Is there anyway to not show the locations that have NO records associated with it and display the 0's?

 

PBIX Example

5 Replies

  • jthomson's avatar
    jthomson
    Icon for Solution Sage rankSolution Sage

    Post some data and what you want the output to look like. Your "brings in all locations" comment makes no sense without context as to what you want to be shown as zero and what you want to be shown as blank

    • thmonte's avatar
      thmonte
      Icon for Helper IV rankHelper IV

      jthomson wrote:

      Post some data and what you want the output to look like. Your "brings in all locations" comment makes no sense without context as to what you want to be shown as zero and what you want to be shown as blank


       

      Having a hard time attaching a .pbix - I did update my original post with photos tho.

       

       

      Edit:  Also added external link to pbix

    • thmonte's avatar
      thmonte
      Icon for Helper IV rankHelper IV

      so rather than the IF statement just +0 ?

      • Anonymous's avatar
        Anonymous
        Not applicable

        thmonte,

        I also drag Location field of Target  table to Matrix rows, and filter out blank locations in visual level filter of the Matrix visual.

        Regards,
        Lydia