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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
unais
Helper V
Helper V

Disable Matrix Expansion on Particular Rows

 

Referring to the below Screenshot created Matrix with " GL Group OPE " Expanding to " GL Account".

" Total Operating Expense " is some of All " GL Group OPE" Values.

Refer to the second screenshot while expanding "Total Operating Expenses" showing all GL Name ( Repeated above)

can be Disable only particular Rows 

 

unais_0-1620034023192.png

 

 

unais_1-1620034091678.png

 

 

 

 

unais_2-1620034447252.png

 

5 REPLIES 5
v-robertq-msft
Community Support
Community Support

Hi, @unais 

As far as I’m concerned, to disable only particular Rows of expanding in the Matrix in Power BI, the only way is to change the data source to delete the data related to this group.

Create matrix visualizations in Power BI

 

If you have an idea about this, you can go to the Power BI Idea to submit a new idea so that people with the same idea can vote for you. I will also vote for you.

v-robertq-msft_0-1620198960070.png

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Do you by any chance know if this functionality have been implemented since you posted that information?

I happen to be in a situation where it would be very beneficial to lock some rows as not expandaple and some as always expanded.

negi007
Community Champion
Community Champion

@unais you can either swich off the +/- hiearchy icon for all or you can have it for all. There is no option to have it only for selected items. any items which has a below hiearchy value this icon will appear against that value.

 

to remove the icon for all under the row header section, you can change below settings.

 

negi007_0-1620043793144.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

Two years have passed and many versions has been cerated since 2021. Is it today possible to disable expansion of certain rows and force expansion on others?

For example, I know the sum is correct in the first row here but that if it is expande the subrows will not be correct:

Tim_0-1678268921348.png


It is also a fcact that the subrows of the second row are interesting to the users but not in the first.

I cannot change the source data but I would like to provide this data to the users without confusing them with the expansion of the first row. Is that possible?

Hello,

 

You can use Switch True to define those groupings you do not want to expand. Here is a sample of the dax code:

 

SWITCH(
    TRUE()
    // use this example to eliminate account rows expansion in matrix. You have to define every possible scope separately.

    //Operating Profit (Loss)
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && ISINSCOPE('Chart Of Accounts'[Kood Konto (eng)]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Operating Profit (Loss)", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Operating Profit (Loss)", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Operating Profit (Loss)", BLANK()

    //Profit (loss) before tax
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && ISINSCOPE('Chart Of Accounts'[Kood Konto (eng)]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Profit (loss) before tax", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Profit (loss) before tax", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Profit (loss) before tax", BLANK()

    //Annual period profit (loss)
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && ISINSCOPE('Chart Of Accounts'[Kood Konto (eng)]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Annual period profit (loss)", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && ISINSCOPE('Profit and Loss report'[Account Name]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Annual period profit (loss)", BLANK()
    , ISINSCOPE('Profit and Loss report'[Account Group]) && ISINSCOPE('Profit and Loss report'[Account SubGroup]) && SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Annual period profit (loss)", BLANK()  
   
//===============================================================================================================

    // here are sub calculations and matrix total calculation
    , SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Operating profit (loss)",
        CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Revenue" ) ) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Operating and administrative costs" ) )
    , SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Profit (loss) before tax",
        CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Revenue" ) ) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Operating and administrative costs" )) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Adjustments" )) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Financial and other" ) )
    , SELECTEDVALUE('Profit and Loss report'[Account Group]) = "Annual period profit (loss)",
        CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Revenue" ) ) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Operating and administrative costs" )) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Adjustments" )) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Financial and other" )) + CALCULATE( SUM( 'PL Data'[Amount eur] ) , FILTER( ALL( 'Profit and Loss report' ), 'Profit and Loss report'[Account Group] = "Tax" ) )

    , ISINSCOPE('Profit and Loss report'[Account Group]), SUM('PL Data'[Amount eur])

    , CALCULATE( SUM('PL Data'[Amount eur]), PL_Account_Report_Structure[Account Group] <> "All accounts" ) - CALCULATE( SUM('PL Data'[Amount eur]), PL_Account_Report_Structure[Account Group] = "All accounts" )
)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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