Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hi there,
I'd like to calculate the following in a measure (see screenshot):
Solved! Go to Solution.
Hi @topigs_user ,
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 @topigs_user ,
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.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!