Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hello,
I have the following problem and i need some advice.
I would like to create the following:
Partner - last sales date - last sale amount - AVG sales by partners
1 - 2021.08.20 - 7000 - 2430
2 - 2021.08.22 - 6500 - 3000
I have the partner and the last sales date, but cant figure it out how to put the rest 2 columns
My tables:
One table that countains all documents, sales deliveris etc, with dates, and partner datas.
ID - PartnerID - Fullfillmentdate - Type - Amount
1 - 1 - 2021.07.01 - Sale - 4500
2 - 1 - 2021.08.20 - Sale - 7000
3 - 2 - 2021.08.10 - Sale - 100
4 - 2 - 2021.08.22 - Sale - 600
5 - 2 - 2021.08.22 - Sale - 6500
On the same day there could be more sales and i need the last one by table ID, and fullfillmentdate.
Solved! Go to Solution.
@Akos07 , Please try a measure like
Measure =
VAR __id = MAX ('Table'[PartnerID] )
VAR __date = CALCULATE ( MAX('Table'[Fullfillmentdate] ), ALLSELECTED ('Table' ), 'Table'[PartnerID] = __id )
CALCULATE ( sum('Table'[Amount] ), VALUES ('Table'[PartnerID ] ),'Table'[PartnerID] = __id,'Table'[Fullfillmentdate] = __date )
or
calculate(lastnonbalnkvalue('Table'[Fullfillmentdate] ,sum('Table'[Amount])), filter(allselected('Table'), 'Table'[PartnerID] = max('Table'[PartnerID])))
@Akos07 , Please try a measure like
Measure =
VAR __id = MAX ('Table'[PartnerID] )
VAR __date = CALCULATE ( MAX('Table'[Fullfillmentdate] ), ALLSELECTED ('Table' ), 'Table'[PartnerID] = __id )
CALCULATE ( sum('Table'[Amount] ), VALUES ('Table'[PartnerID ] ),'Table'[PartnerID] = __id,'Table'[Fullfillmentdate] = __date )
or
calculate(lastnonbalnkvalue('Table'[Fullfillmentdate] ,sum('Table'[Amount])), filter(allselected('Table'), 'Table'[PartnerID] = max('Table'[PartnerID])))
The 2. option does the trick, thanks.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
70 | |
42 | |
42 |
User | Count |
---|---|
49 | |
42 | |
29 | |
28 | |
27 |