Forum Discussion

bdehning's avatar
bdehning
Icon for Post Prodigy rankPost Prodigy
2 years ago

Remove Blanks in matrix table

I have this Matrix Table.   

 

Here is my Values Measure

Top3CauseCount =
VAR CurrentRank = [RankCauseGrouping]
VAR CountValue = [Count of Total Gross Incurred +0]
RETURN
    IF(
        NOT(ISBLANK(CountValue)) && CountValue > 0 && CurrentRank <= 3,
        CountValue,
        BLANK()
    )

 

Here is RankCauseGrouping

 

RankCauseGrouping =
RANKX(
    ALLSELECTED('InjuryCause'[Cause Grouping]),
    [Count of Total Gross Incurred +0],
    ,
    DESC,
    DENSE
)

What do I need to to eliminate the blanks in my table?   

5 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    There are 4 rows in your table including the total row. Every row has at least 1 valid number to display. What result do you expect?

    • bdehning's avatar
      bdehning
      Icon for Post Prodigy rankPost Prodigy

      I may need to leave as a vertical table, since Top causes are not the same for each year.   I was hoping to show the Top 3 Causes by Count for each year.  Totals are strange as they muxt be picking up totals of causes outside the Top 3?

       

    • bdehning's avatar
      bdehning
      Icon for Post Prodigy rankPost Prodigy

      Yes I can turn totals off but there is still the blank issue?

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    The first table you posted correctly displays the results. If you don't want to see the blanks, then set it up like the second table you posted.  If you want to use the first table structure with no blanks, please produce the table manually (using Excel) to show what you expect to see. I suspect doing this will help you realise that they way it is in the OP is the correct result.