Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
hi everyone
I need to look for the same part name according to the order date between the order date and + 3 days more spare
for exaple: the first line on the order table with part name A-123 maching to the first line on the invoice table because the date is in the range of 13/08/2021 + 3 (between 13/08/2021 and 16/08/2021)
can someone help me find the right dax formula to build the desired table?
thanks :))
Hi, @davidibi4524
Why does A-456 match the invoice quantity of 2000, and isn't the part name of the invoice quantity of 2000
A-123? Am I missing something?
Best Regards,
Community Support Team _ Zeon Zheng
Hi,
I suggest that you write a calculated column formula in the Orders table. Are you interested in that solution (instead of a measure)?
@davidibi4524 Maybe:
Measure =
VAR __PartName = MAX('ORDERS'[part name])
VAR __MinDate = MAX('ORDERS'[date])
VAR __MaxDate = __MinDate + 3
VAR __Table = FILTER('INVOICES',[part name]=__PartName && [date] >= __MinDate && [date]<=__MaxDate)
RETURN
SUMX(__Table,[quantity])
i can't sum this measure..
what i can do?
@davidibi4524 Well, measure aggregation is a slightly different topic. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149
The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.
going to try it