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
pratafran
Helper III
Helper III

Matrix, calculate expression in different periods of time in columns

Hello!,

 

I have an expression (let's say SUM(Sales[Qty])) that I want to put into a matrix, but I want to evaluate different periods of time in columns.

 

For Example, calculating the sum of sales cummulated, last quarter, last month and last 6 weeks.

 

SalesYTDLast QuarterLast MonthWeek 5Week 6Week 7Week 8Week 9Week 10
Qty21000750030008007004006001000900

 

I can generate a measure for each of them with CALCULATE ( SUM(Sales[Qty]), FILTER(Calendar, Date = XXXX)) but I would like to avoid creating too many measures.

 

Is it possible, to generate a measure with multiple results? and expose those into columns in a matrix?. For example, defining each measure into variables (VAR) but allowing multiple RETURN. Any other approach to avoid multiple measure creation is also a possibility.

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

2 REPLIES 2
Anonymous
Not applicable

Hi,

I think maybe calculation groups may work for you:

REDUCE the # of measures with Calculation Groups In Power BI - YouTube

 

thank you, that is exactly what I was looking for.

The only thing that I think is not possible is to dynimically change the name of the measure depending on the content (for example for the las 6 weeks, each column to show the number of each in the column name).

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.

Top Solution Authors
Top Kudoed Authors