Forum Discussion
Anonymous
4 years agoNot applicable
DAX QUERY FOR FILL DOWN
Hi Professionals..!! Need help in understanding the dax for getting the last column data as measure, basically it is a fill down in dax.
Anonymous
4 years agoNot applicable
https://drive.google.com/file/d/1CMFr0oRjq1rb8gdCas-5V5oEa_s606uW/view
Jihwan_Kim please help us with this data as we are unable to get the correct result
- Jihwan_Kim4 years ago
Super User
Hi,
Your pbix file has a page-filter.
Please try the below and check the attached file.
Mydesire = VAR currentrows = MAX ( Mydata[Rows] ) VAR currentdate = MAX ( Mydata[Date] ) VAR startdate = MINX ( FILTER ( ALLSELECTED( Mydata ), Mydata[Rows] = currentrows && Mydata[NewMC] <> BLANK () ), Mydata[Date] ) VAR previousdate = MAXX ( FILTER ( ALLSELECTED ( Mydata ), Mydata[Rows] = currentrows && Mydata[Date] <= currentdate && Mydata[NewMC] <> BLANK () ), Mydata[Date] ) VAR previousvalue = MAXX ( FILTER ( ALLSELECTED ( Mydata ), Mydata[Rows] = currentrows && Mydata[Date] = previousdate ), Mydata[NewMC] ) RETURN IF ( HASONEVALUE ( Mydata[Rows] ), IF ( MAX ( Mydata[Date] ) = startdate, SUM ( Mydata[NewMC] ), previousvalue ) )