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 Eveyone
I am trying to list the last price sold on item across different location in a table visual , and calculating the difference. But i am struggling to acheive this.
I am using the below measures to calculate the difference.
LPRCA = calculate(MAX('table1'[Price]),LASTDATE('table1'[Order Date]),'table1'[Location] = "A")
LPRCB = calculate(MAX('table1'[Price]),LASTDATE('table1'[Order Date]),'table1'[Location] = "B")
Help ! Help !
Thanks
Solved! Go to Solution.
Hi @PBI_User2300,
You could create the measure below to get the last price sold on item across different location and the difference.
LPRCA =
VAR adate =
CALCULATE ( MAX ( 'Table'[Order Date]), 'Table'[Location] = "A")
RETURN
CALCULATE (
MAX ( 'Table'[Price] ),
FILTER (
'Table' ,
'Table'[Location] = "A"
&& 'Table'[Order Date] = adate
)
)
LPRCB =
VAR bdate =
CALCULATE ( MAX ( 'Table'[Order Date] ), 'Table'[Location] = "B" )
RETURN
CALCULATE (
MAX ( 'Table'[Price] ),
FILTER (
'Table' ,
'Table'[Location] = "B"
&& 'Table'[Order Date] = bdate
)
)
The picture of the result is below.
Hope it can help you!
Best Regards,
Cherry
Hi @PBI_User2300,
You could create the measure below to get the last price sold on item across different location and the difference.
LPRCA =
VAR adate =
CALCULATE ( MAX ( 'Table'[Order Date]), 'Table'[Location] = "A")
RETURN
CALCULATE (
MAX ( 'Table'[Price] ),
FILTER (
'Table' ,
'Table'[Location] = "A"
&& 'Table'[Order Date] = adate
)
)
LPRCB =
VAR bdate =
CALCULATE ( MAX ( 'Table'[Order Date] ), 'Table'[Location] = "B" )
RETURN
CALCULATE (
MAX ( 'Table'[Price] ),
FILTER (
'Table' ,
'Table'[Location] = "B"
&& 'Table'[Order Date] = bdate
)
)
The picture of the result is below.
Hope it can help you!
Best Regards,
Cherry
Hi @v-piga-msft
Grand Total for these measures are not correct (I noticed it today). Any idea how to resolve those ? I read lot of articles end up confused. Help !
Thanks
Hi,
You may refer to my solution here.
Hope this helps.
Thanks @Ashish_Mathur
I tried your solution and received this error when there is more than one Part Number
( I added 1000 as new part number )
My bad, i should have added few Part numbers in my sample table.
Appreciate your help.
Hi,
Refer to the revised file here.
Hope this helps.
i am looking to resolve the Grand Total ( already resolved Last Price ) .. any suggestions ?
Thanks again
Hi,
What answer are you expecting in the Grand Total row? Please tell me the exact numbers that you want there.
I want to see A=32 (19+13) and B=21 (11+10) in "Totals" row. I read lot of posts related to this, and it looks like a complex one to resolve, why dont it just add the data in each row displayed and show it in "Total" row :). I am sure there is a logic of how its calculated currently (showing 13 and 10 Respectively)
Thanks for your help.
Hi,
You may refer to my solution here.
Hope this helps.
Thanks v-piga-msft. It worked.
Appreciate your help.
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 |
---|---|
104 | |
69 | |
48 | |
41 | |
34 |
User | Count |
---|---|
164 | |
111 | |
62 | |
53 | |
38 |