Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
dbrandone
Helper III
Helper III

Table Matrix Conundrum, Looking for ideas!

Hi Everyone,

 

I have a matrix that I am putting together and the second value in the row field(drill down) is pulling all values relating to the columns instead of the values that are not zero. The typical way that I would solve this is that with a column that is the "main column" over the rest, I would visual filter for values >= 1, but in this case, there are some zeros that I need. The initial row is Month and the second would be ID numbers. Below is some pictures of what I am speaking about. In the first picture, I want only the values in the "transplant intent recoveries" that equal 1. My issue is what you will see in the second picture as I will need to show if none were done at the month level. 

 

Any ideas on how I could do this?

 

dbrandone_0-1631718825400.png

dbrandone_1-1631718876990.png

 

 

2 ACCEPTED SOLUTIONS

@dbrandone Try:

Transplant Intent Recoveries Total = 
    VAR TIRtotal = 
        CALCULATE(
            COUNTROWS(v_EyeRecovery_EyeTissueRecovered),
            v_EyeRecovery_EyeTissueRecovered[RecoveryIntent] = "Transplant",
            v_EyeRecovery_EyeTissueRecovered[ParentId] = BLANK()
    )

    VAR Result = IF(
                    ISBLANK(TIRtotal),
                    0,
                    TIRtotal
    )

    Return IF(ISINSCOPE('Dates'[MonthName]),1,Result)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@dbrandone Did you add that measure to the matrix? If not, try that and turn off word wrap and then shrink the column to nothing.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
Greg_Deckler
Super User
Super User

@dbrandone You will want to add ISINSCOPE to your selector measure so that you always return 1 when at the Month Name level. Otherewise, seems like you are familiar with what I call a Complex Selector: The Complex Selector - Microsoft Power BI Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Appreciate the response @Greg_Deckler. I haven't messed with ISINSCOPE yet and just read the DAX guide on it and trying to visualize how to implement it. Below is the measure for Transplant Recoveries, and if I am understanding what you are saying, I need to tie ISINSCOPE with MonthName inside of the below measure, correct?

Transplant Intent Recoveries Total = 
    VAR TIRtotal = 
        CALCULATE(
            COUNTROWS(v_EyeRecovery_EyeTissueRecovered),
            v_EyeRecovery_EyeTissueRecovered[RecoveryIntent] = "Transplant",
            v_EyeRecovery_EyeTissueRecovered[ParentId] = BLANK()
    )

    VAR Result = IF(
                    ISBLANK(TIRtotal),
                    0,
                    TIRtotal
    )

    Return Result



 

@dbrandone Try:

Transplant Intent Recoveries Total = 
    VAR TIRtotal = 
        CALCULATE(
            COUNTROWS(v_EyeRecovery_EyeTissueRecovered),
            v_EyeRecovery_EyeTissueRecovered[RecoveryIntent] = "Transplant",
            v_EyeRecovery_EyeTissueRecovered[ParentId] = BLANK()
    )

    VAR Result = IF(
                    ISBLANK(TIRtotal),
                    0,
                    TIRtotal
    )

    Return IF(ISINSCOPE('Dates'[MonthName]),1,Result)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler July still dropped off after the ISINSCOPE add to the measure.

Hi @dbrandone,

Any update for these? Did Greg_Deckler 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept the helpful suggestions to help others who faced similar requirements.

If these also don't help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@dbrandone Did you add that measure to the matrix? If not, try that and turn off word wrap and then shrink the column to nothing.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.