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

View all the Fabric Data Days sessions on demand. View schedule

Reply
NilR
Post Patron
Post Patron

How reference SUMMARIZE measure in another measure?

If I create a Summarize as below how can I refrence in another measure? I also tried with Group By and still get the same error. It works as variable, but not stand alone measure.

 

 

 

 

 

Grps = 
var _Max_Date = MAX('Calendar Service'[Date])
var _Min_Date = MIN('Calendar Service'[Date])
VAR _PHASE = ALLSELECTED('DIM'[PHASE])


 RETURN 
  SUMMARIZE(FILTER(Group_Details,([DATE] >= _Min_Date && [DATE]<= _Max_Date),'001 Table'[Grp_NB])

 

 

 

 

 

 

Use it in below measure:

 

 

 

 

 

Measure 2-A= 
CALCULATE(SUMX(VALUES('Table'[ID]),1), KEEPFILTERS(NOT 'Table'[GrpNum] IN [Grps] ))

or 

Measure 2-B=
SUMMARIZE(
        FILTER( 'Table' , NOT [Grps] IN [Grps] &&  ALLSELECTED('Table'[_ID]) IN [ID_12] 
        && ('Table'[Date] >= _Max_12_MOS &&  'Table'[Date] <= _Max_Date)),'Table'[GrpNum])

 

 

 

 

 

I get an error: [Grps] is not a valid Table.

4 REPLIES 4
Anonymous
Not applicable

Hi @NilR ,

Does that make sense? If so, kindly mark @amitchandak 's answer as the solution to close the case please. Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

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

unfortuntly, this is what I had and trying to create something similar to dynamic table with either group by or Summarize 

amitchandak
Super User
Super User

@NilR , keep summarize code in measure else it will be static

 

Grps =
var _Max_Date = MAX('Calendar Service'[Date])
var _Min_Date = MIN('Calendar Service'[Date])
VAR _PHASE = ALLSELECTED('DIM'[PHASE])
var _tab = SUMMARIZE(FILTER(Group_Details,([DATE] >= _Min_Date && [DATE]<= _Max_Date),'001 Table'[Grp_NB])
RETURN
CALCULATE(SUMX(VALUES('Table'[ID]),1), filter('Table', NOT 'Table'[GrpNum] IN [Grps] ))

or

Grps =
var _Max_Date = MAX('Calendar Service'[Date])
var _Min_Date = MIN('Calendar Service'[Date])
VAR _PHASE = ALLSELECTED('DIM'[PHASE])
var _tab = SUMMARIZE(FILTER(Group_Details,([DATE] >= _Min_Date && [DATE]<= _Max_Date),'001 Table'[Grp_NB])
RETURN
CALCULATE(SUMX(VALUES('Table'[ID]),1), filter(all('Table'[GrpNum]), NOT 'Table'[GrpNum] IN [Grps] ))

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

@amitchandak Thank you! I have about 6 measures using the Summaries and I was hoping to pull this out to increase the performance. It takes decades to load 🤦‍

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.