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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
mrothschild
Continued Contributor
Continued Contributor

Matrix - multiple numerical formats for Value from single measure

PBIX File: https://drive.google.com/file/d/1j_4CrUj0fPh0xK6hnO7OZ-uIWkoP5Kdg/view?usp=sharing

 

In the screenshot below, the upper panel shows the intended numerical format for the row associated with "Y/Y %".  The upper panel was created using multiple individual [measures].  The lower panel uses a single [measure] determined as follows:

SINGLE_MEASURE = 
    
        [Upside] +
        [Actual] +
        [Expected] +
        [Downside] +
        [Y/Y %]

 

Two questions:

1) How can I change the SINGLE_MEASURE so that the [Y/Y %] row in the matrix is FORMAT( [Y/Y %] , "0.0%; (0.0%)" ?

2) How can I change the SINGLE_MEASURE so that when the row (e.g,. 2007, 2008, 2009. . . ) is collapsed, it displays only [Actual]?

 

Thanks!

mrothschild_0-1628004085944.png

 

1 ACCEPTED SOLUTION

Sorry, I missed your question #2.

 

That would be like this.

 

__SINGLE MEASURE = 

// This takes the individual [MEASURES] named in the disconnected slicer and combined them into a single measure so that the Matrix table will hide rows from appearing
// 
    VAR _MEASURE = 
        DISTINCT('Measure Slicer'[Measure Names])

    VAR _Y_Y_pct_chg = 
        IF(
            "Y/Y %" IN _MEASURE, 
            [Average Annualized Price change (weighted by Model Year Units)] , 
            BLANK()
        ) 

VAR Result = 
    
        [Upside] +
        [Actual] +
        [Expected] +
        [Downside] +
        _Y_Y_pct_chg 
        
RETURN
IF ( 
    HASONEVALUE ( 'Measure Slicer'[Measure Names] ), 
    IF ( 
        SELECTEDVALUE('Measure Slicer'[Measure Names] ) = "Y/Y %",
        FORMAT(Result,"0.0%; (0.0%)"),
        FORMAT(Result,"$#,#")
    ),
    FORMAT([Actual],"$#,#")
)

 

jdbuchanan71_0-1628007190551.png

 

View solution in original post

5 REPLIES 5
jdbuchanan71
Super User
Super User

@mrothschild 

Give it a try like this.

 

__SINGLE MEASURE = 

// This takes the individual [MEASURES] named in the disconnected slicer and combined them into a single measure so that the Matrix table will hide rows from appearing
// 
    VAR _MEASURE = 
        DISTINCT('Measure Slicer'[Measure Names])

    VAR _Y_Y_pct_chg = 
        IF(
            "Y/Y %" IN _MEASURE, 
            [Average Annualized Price change (weighted by Model Year Units)] , 
            BLANK()
        ) 

VAR Result = 
    
        [Upside] +
        [Actual] +
        [Expected] +
        [Downside] +
        _Y_Y_pct_chg 
        
RETURN
    IF ( 
        SELECTEDVALUE('Measure Slicer'[Measure Names] ) = "Y/Y %",
        FORMAT(Result,"0.0%; (0.0%)"),
        FORMAT(Result,"$#,#")
)

 

 

 

@jdbuchanan71  that works great for the formatting issue!  Thanks!

 

Now, when I collapse the rows to a single, how can I get the output displayed on the matrix to only be [Actual] if more than one Slicer option is selected?

 

 

Sorry, I missed your question #2.

 

That would be like this.

 

__SINGLE MEASURE = 

// This takes the individual [MEASURES] named in the disconnected slicer and combined them into a single measure so that the Matrix table will hide rows from appearing
// 
    VAR _MEASURE = 
        DISTINCT('Measure Slicer'[Measure Names])

    VAR _Y_Y_pct_chg = 
        IF(
            "Y/Y %" IN _MEASURE, 
            [Average Annualized Price change (weighted by Model Year Units)] , 
            BLANK()
        ) 

VAR Result = 
    
        [Upside] +
        [Actual] +
        [Expected] +
        [Downside] +
        _Y_Y_pct_chg 
        
RETURN
IF ( 
    HASONEVALUE ( 'Measure Slicer'[Measure Names] ), 
    IF ( 
        SELECTEDVALUE('Measure Slicer'[Measure Names] ) = "Y/Y %",
        FORMAT(Result,"0.0%; (0.0%)"),
        FORMAT(Result,"$#,#")
    ),
    FORMAT([Actual],"$#,#")
)

 

jdbuchanan71_0-1628007190551.png

 

@jdbuchanan71 

 

Is there a better framing for:

 

VAR Result = 
    
        [Upside] +
        [Actual] +
        [Expected] +
        [Downside] +
        _Y_Y_pct_chg 

 While it creates the right output in my matrix, I think it's wreaking havoc with the line chart I'm trying to create from it.

 

THanks!

Perfect!

 

Thanks!

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.