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

Subtotals in drill-down

Hello,

Sorry for the text in portuguese. I am trying to make it so the subtotal "FATURAMENTO LÍQUIDO" doesn't get drilled down. As you can see by the collors, this subtotal is doubling everything above him (as it should as calculation, but not in the visual bit) and I don't know how to show only the total and not everything that composes it.

Doubt PBI Forum.png

 

Here is the measure I'm using:

Realizado = 

    SWITCH(TRUE(),
    SELECTEDVALUE('Máscara'[Subtotal?])=0,[Total Realizado],
    SELECTEDVALUE('Máscara'[Subtotal?])=1, CALCULATE([Total Realizado],
        ALL('Máscara'[Conta Contábil]),
        'Máscara'[Cod Formato] <= VALUES('Máscara'[Cod Formato])
    ),BLANK()
)

As you can see, if it is a subtotal sum everything above, but what I would like to do is only show the total. If i click on drill-down it should appear the '-' sign without another line being added, only the total beside it.

 

The files are below. Didn't add "Orçado" as it is not important.

https://1drv.ms/u/s!Au9GnH7ZLFaWiFFCbLAebSfarK3s?e=NwpCh8 

 

 

Thanks for any help.

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @floressdiego ,

Please try to update the formula of measure as below and check whether it can get the correct result:

Realizado = 

    SWITCH(TRUE(),
    SELECTEDVALUE('Máscara'[Subtotal?])=0,[Total Realizado],
    SELECTEDVALUE('Máscara'[Subtotal?])=1, CALCULATE([Total Realizado],
       FILTER(ALL('Máscara'[Cod Formato]),
        'Máscara'[Cod Formato] <= VALUES('Máscara'[Cod Formato]))
    ),BLANK()
)

Subtotals in drill-down.JPG

Best Regards

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

Thank you for your reply, but with this solution as soon as I take the "Orçado" out of the Values it doesn't show the subtotals anymore. As in another page I want to be able to use only "Realizado". If you have any other solutions I would apreciate it 🙂

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.