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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Alessandra
Helper I
Helper I

How to make the grand total row full of 100%

Hi,

 

I have a measure in Power BI, it's all ok, but I want to force the grand total so it can be 100%.

Any ideas?

 

Here is the measure: 

 

Measure = IF(CALCULATE(SUM(table[ValChannel]),ALLEXCEPT(table,TABLE[Channel]))=0,(SUMX(
SUMMARIZE(TABLE,TABLE[IdBussiness],TABLE[Date],
"MaxSubtotal", MIN(TABLE[S])),[MaxSubtotal]) / CALCULATE(SUMX(
SUMMARIZE(TABLE,TABLE[IdBusiness],TABLE[Date],
"MaxSubtotal", MAX(TABLE[D])),[MaxSubtotal]),ALLSELECTED(TABLE[SEG]),ALLSELECTED(TABLE[FA]),ALLSELECTED(TABLE[Brand]),ALLSELECTED(TABLE[PRES]),ALLSELECTED(TABLE[TAM]))))

1 ACCEPTED SOLUTION

Hi @Alessandra,

 

Based on your formula, it seems like you are try to calculate on summarized 'min total ' value and 'max total' value who filtered by current row contents, right?

 

If this is a case, you can take a look at below measure if it suitable for your requirement.

 

Sample:

SSN =
VAR summaried =
    SUMMARIZE (
        ALLSELECTED ( table ),
        table[CodigoNegocio],
        table[FechaD],
        "MinSubtotal", MIN ( table[SSTPESO] ),
        "MaxSubtotal", MAX ( table[DSTPESO] )
    )
RETURN
    IF (
        HASONEVALUE ( table[SEGMENTOS] ),
        DIVIDE (
            SUMX (
                FILTER ( summaried, [SEGMENTOS] = SELECTEDVALUE ( table[SEGMENTOS] ) ),
                [MinSubtotal]
            ),
            SUMX (
                FILTER ( summaried, [SEGMENTOS] = SELECTEDVALUE ( table[SEGMENTOS] ) ),
                [MaxSubtotal]
            ),
            0
        ),
        1
    )

Regards,

Xiaoxin Sheng

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

View solution in original post

11 REPLIES 11

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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