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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JGG
Helper I
Helper I

Measure sum accross product types

Hi,

My model is as in the first figure. I should also mention that I do have startdate and enddate in the model which are related to the periode (2010 have startdate 2020-10-01 and enddate 2020-10-31).

For each ProductID of ProductType = Main I need sum of all invoice lines for the CustID having that ProductID for each periode. For the Qty I need the Qty for the ProductType Main only. Anyway to solve this in a measure?

JGG_0-1606315642447.png

 

In addition I need to identify and handle to special cases:

case 1: Change of Main and AddOn in the periode
case 2: Change of only Main in the periode

(Note that the sum of Qty for Main = sum of Qty for AddOn for each CustID and Periode.)

 

How do I identify and handle these cases in a measure (or perhaps two)?

 

Case 1:

JGG_1-1606316987245.png

 

Case 2:

JGG_2-1606317017295.png

 

regards JG

1 REPLY 1
v-deddai1-msft
Community Support
Community Support

Hi @JGG ,

 

Would you please show more details about how  do you distinguish Case1 from Case2?

 

Best Regards,

Dedmon Dai

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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