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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Advanced filtering and aggregation problem

I'd like to create a calculated table ( i think using SUMARIZE) from a table called BILLING

that returns COMPANYNAME

, city, state

, a column named FinalDate (where finaldate is somewhere between now and 12 months in the future)

, a sum of the last 12 months RECEIPT by companyname

I have a column called MONTHSAGO which is zero based and can be used to filter the last 12 months of records, 

but i do not understand how to add the filter which will show only totals where the FINALDATE is between now and 12 months in the future.  is that a filter all or something else?

 

=SUMMARIZE(BILLING
,BILLING[CompanyName]
,BILLING[CITY]
,BILLING[STATE]

,BILLING[FINALDATE]
, "RECEIPTTOTAL", calculate(
sum(BILLING[RECEPT])
,Filter (
(BILLING),
(BILLING[MONTHSAGO]) < 12
)
)

)

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Why do you want to create a calculated table?  Why not an actual visual?  Calculated tables do not respond to changes in slicer while visuals do.


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

It's not quite clear to me what your data table looks like. Is there only one MONTHSAGO value for each FINALDATE?

 

If so, does this work for what you're after?

 

SUMMARIZECOLUMNS (
    BILLING[CompanyName],
    BILLING[CITY],
    BILLING[STATE],
    BILLING[FINALDATE],
    FILTER ( VALUES ( BILLING[MONTHSAGO] ), BILLING[MONTHSAGO] < 12 ),
    "RECEIPTTOTAL", CALCULATE ( SUM ( BILLING[RECEPT] ) )
)

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.