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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mtussey
New Member

Column Total with All Other not equal.

Hello All,

PBI Community.PNG

Please see I set a calculation to calculate the Top 8, but the one total isn't adding the "all other" (144K).

 

Here is my measure via help on YouTube:

Top Category Units =

VAR TopProdTable =
TOPN(8, ALLSELECTED('Pseudo Supplier'),[CY Units]
    )
 VAR TopProdSales =  CALCULATE(
    [CY Units],
    KEEPFILTERS( TopProdTable)
       
)
VAR AllOtherSales =
    CALCULATE([CY Units],
    ALLSELECTED('Pseudo Supplier')
    ) - CALCULATE([CY Units],TopProdTable
    )
VAR CurrentProd = SELECTEDVALUE('Pseudo Supplier'[PrimarySupplier])
Return
    if(CurrentProd<> "All Other",
        TopProdSales,
        AllOtherSales)
 
Any ideas how to get the total on Top products and the all other to equal the 3.08M?

TIA.
 
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1751240662496.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @mtussey,

Thanks for reaching out to the Microsoft fabric community forum.

Just following up to your previous conversation with @Ashish_Mathur, @danextian and @lbendlin, I'd like to confirm if you've successfully resolved this issue or if you need further help.

If you have got the solution then kindly share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.

 

I would also take a moment to thank @Ashish_Mathur, @danextian and @lbendlin, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.
Community Support Team

Anonymous
Not applicable

Hi @mtussey,

As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.

If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution. And if you're still looking for guidance, feel free to give us an update, we’re here for you.

 

Best Regards,

Hammad.

Anonymous
Not applicable

Hi @mtussey,
Hope everything’s going smoothly on your end. As we haven’t heard back from you, so I wanted to check if the issue got sorted.
Still stuck? No worries just drop us a message and we can jump back in on the issue.

 

Best Regards,

Hammad.

Anonymous
Not applicable

Hi @mtussey,
We noticed there hasn’t been any recent activity on this thread. If your issue is resolved, marking the correct reply as a solution would be a big help to other community members. If you still need support, just reply here and we’ll pick it up from where we left off.

 

Best Regards,

Hammad.

Ashish_Mathur
Super User
Super User

Hi,

I have solved a similar question in the attached PBI file.

Hope this helps.

Ashish_Mathur_0-1751240662496.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
danextian
Super User
Super User

Hi @mtussey 


At the total level, CurrentProd evaluates to true because SELECTEDVALUE('Pseudo Supplier'[PrimarySupplier]) returns blank. As a result, only TopProdSales is returned. There's nothing in the logic that adds AllOtherSales back in. Try

IF (
    NOT ( HASONEVALUE ( 'Pseudo Supplier'[PrimarySupplier] ) ),
    [CY Units]  -- or TopProdSales + AllOtherSales,
    IF (
        CurrentProd <> "All Other",
        TopProdSales,
        AllOtherSales
    )
)

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.