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.
Hi there,
I'd like to calculate the following in a measure (see screenshot):
Solved! Go to Solution.
Hi @Anonymous ,
Check the measures as below.
Measure =
var max_date = CALCULATE(MAX('Table'[date]),ALLEXCEPT('Table','Table'[plantid]))
return
IF(SELECTEDVALUE('Table'[date])=max_date,SUM('Table'[value]),BLANK())
Measure 2 = SUMX('Table',[Measure])
Best Regards,
Jay
Hi @Anonymous ,
Check the measures as below.
Measure =
var max_date = CALCULATE(MAX('Table'[date]),ALLEXCEPT('Table','Table'[plantid]))
return
IF(SELECTEDVALUE('Table'[date])=max_date,SUM('Table'[value]),BLANK())
Measure 2 = SUMX('Table',[Measure])
Best Regards,
Jay
Here is a measure expression that should work.
RecentValue =
VAR vLastValue =
SUMX (
VALUES ( T1[PlantID] ),
CALCULATE (
LASTNONBLANKVALUE (
T1[Date],
AVERAGE ( T1[Value] )
)
)
)
RETURN
IF (
OR (
NOT (
HASONEVALUE ( T1[PlantID] )
),
MAX ( T1[Date] )
= CALCULATE (
MAX ( T1[Date] ),
ALLSELECTED ( T1[Date] )
)
),
vLastValue
)
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi there, thanks for your support.
Unfortunately, it does not the trick.
It shows me 15 on all rows where plantid is 456. I only want to see it on the row where the modification date = max date.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |