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
kmkwongaa
Helper I
Helper I

How to hide some total value in table for some column?

Hi all,

 

I have the following table.

 

The delta column are in string so that the total show first / last value of delta column

kmkwongaa_0-1597133289354.png

 

Is there method to get the correct number shown in total (e.g. "-9+12+8+2 = +13" & +"83+50+55+3 = +191")

 

or can i simply hide the total number for these two delta column??

 

I prefer hide the total for these two delta column.

 

Can anyone tell me how can I achieve this in PowerBI ? Thanks a lot.

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @kmkwongaa 

Create measures

Measure 2_no =
CONVERT (
    IF (
        SEARCH ( "-", MAX ( 'Table'[no] ), 1, 0 ) >= 1,
        MID ( MAX ( 'Table'[no] ), 2, SEARCH ( ")", MAX ( 'Table'[no] ), 1, 0 ) - 2 ),
        MID ( MAX ( 'Table'[no] ), 3, SEARCH ( ")", MAX ( 'Table'[no] ), 1, 0 ) - 3 )
    ),
    INTEGER
)


Measure 2 = IF(ISINSCOPE('Table'[cate]),[Measure 2_no], SUMX('Table',[Measure 2_no]))

Measure 3_n2 =
CONVERT (
    IF (
        SEARCH ( "-", MAX ( 'Table'[n2] ), 1, 0 ) >= 1,
        MID ( MAX ( 'Table'[n2] ), 2, SEARCH ( ")", MAX ( 'Table'[n2] ), 1, 0 ) - 2 ),
        MID ( MAX ( 'Table'[n2] ), 3, SEARCH ( ")", MAX ( 'Table'[n2] ), 1, 0 ) - 3 )
    ),
    INTEGER
)


Measure 3 =
IF (
    ISINSCOPE ( 'Table'[cate] ),
    [Measure 3_n2],
    SUMX ( 'Table', [Measure 3_n2] )
)

Capture1.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I already have measure 2 and measure 3.

 

How can I keep display the number with brackets while I can either show the total sum or hide the total for that specific column only?

amitchandak
Super User
Super User

@kmkwongaa , You can hide for subtotal or total completely.

or create a measure that does not display total

example

measure new = if(isfiltered(Table[Defect Status],[Measure],blank())

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

@amitchandak but how if the value i want to show is not a measure but a column? 

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.