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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ahussnain
Frequent Visitor

The Aggregate for Year includes the values excluded for Quarters

Hi, Please read through with patience as explanation of the problem may not be great.

 

I have table Site and Sales. 

 

Site is Name and Quarter Acquired

SiteX Q1,2017

SiteY Q2, 2017

SiteZ Q2,2017

 

Sales is Quarter, SiteName, $ and Sales have been going on previous to Acquisitions

Q1,2017 SiteX 10

Q1,2017 SiteY 20

Q1,2017 SiteZ  30

Q2,2017 SiteX 11

Q2,2017 SiteY 22

Q2,2017 SiteZ  33

Q3,2017 SiteX 13

Q3,2017 SiteY 23

Q3,2017 SiteZ  33

 

SalesafterAcquision:= calculate(sum($), Filter(Site, max(date)>=Acquiredate>=min(date))

 

I want to see the report showing total sales of all sites since acquisition, so I get this

Q1       Q2              Q3                      2017 (yearly aggregate)

10    (11+21)    (12+22+32)       (10+20+30+11+21+31+12+22+32)

 

I want the 2017 to show only 10+11+21+12+22+32.  

 

Any ideas?

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @ahussnain,

 

Can you please provide something detail? I can't find the corrsponed records from your expected result and original table.

 

Bold part:

Q1       Q2              Q3                      2017 (yearly aggregate)
10    (11+21)    (12+22+32)       (10+20+30+11+21+31+12+22+32)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

Well, as near as I can read this, you are going to need to create a new column in your Site table with something like a RIGHT in order to capture the quarter on its own. Then, you should be able to create a metric that does what you want, where you filter your metric such that you exclude quarters that are before your aquisition date.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.