Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
119 | |
83 | |
47 | |
42 | |
33 |
User | Count |
---|---|
190 | |
78 | |
72 | |
54 | |
45 |