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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Fsciencetech
Helper III
Helper III

Dax Query

Hi folks,

 

I have an dax code which is running will in dax editor, the same thing I want to run on my PBI but throwing error

"Calculation error in measure 'Sales[Max GA%]: SummarizeColumns() and AddMissingItems() may not be used in this context"

Dax Editor :

 

DEFINE
VAR FinalTable = 
    SUMMARIZECOLUMNS(Sales[YearQtr], Sales[BrandCode Group]
        FILTER(KEEPFILTERS(VALUES('Sales'[BrandCode Group])), 'Sales'[BrandCode Group] <> "PCSD")
        "GA_Mix_", 'Sales'[GA Mix%])      ---- Using Measure pre calculated Mix%

  VAR TopBrandValue = 
       TOPN(1, FinalTable, [GA_Mix_], 0)

 

  VAR Result = 
    SUMMARIZECOLUMNS(
      Sales[BrandCode Group], Sales[YearQtr],    
      TopBrandValue,
      "GA_Mix_", 'Sales'[GA Mix%]
    )
EVALUATE
  GROUPBY(Result, "MinGA_Mix_", MINX(CURRENTGROUP(), [GA_Mix_]))

I want to same dax on PBI.

1 REPLY 1
amitchandak
Super User
Super User

@Fsciencetech , Try if you can do same with Addcolumns(Summarize in place of summarize columns  

 

Refer for example 

Solved: Issue with Bar chart: SummarizeColumns() and AddMi... - Microsoft Power BI Community

 

also refer

Power Pivot Principles: The A to Z of DAX Functions - ADDMISSINGITEMS < Article < Blog | SumProduct ...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.