Forum Discussion
idontexist
Helper I
8 years agoRepeat values based on other value
Hi all, I want to repeat values as you can see in column "should be plan". It should be based on column "Fact". If in this column there are any values so plan should be repeated. "Plan" i have 1 ...
v-chuncz-msft
Community Support
8 years ago
You may refer to the following DAX.
Column =
VAR y =
YEAR ( Table1[Date] )
VAR m =
MONTH ( Table1[Date] )
RETURN
IF (
NOT ( ISBLANK ( Table1[Fact] ) ),
LOOKUPVALUE (
Table1[Plan],
Table1[DSR Code], Table1[DSR Code],
Table1[Date], DATE ( y, m, 1 )
)
)
idontexist
Helper I
8 years ago
formulae YEAR and MONTH want to get date in format. Not from column.
So this isn't working for me :(
- Zubair_Muhammad8 years ago
Community Champion
- idontexist8 years ago
Helper I
Sorry, did not mentioned that before... But all values exist in different tables.
Below screenshot
- Zubair_Muhammad8 years ago
Community Champion
Hi idontexist
Actually I gave formula for a calculated column.
EARLIER doesn't work in a MEASURE.
You can share your file via Onedrive or googledrive.
I will try to help