Forum Discussion
idontexist
8 years agoHelper I
Repeat 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 ...
Zubair_Muhammad
8 years agoCommunity Champion
idontexist
8 years agoHelper I
Sorry, did not mentioned that before... But all values exist in different tables.
Below screenshot
- Zubair_Muhammad8 years agoCommunity 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
- idontexist8 years agoHelper I
Unfortunately i can't do that, because it's a "live" data, not local. Without access you will not be able to see anything, and i haven't such persmissions to give your proper rights.
Maybe we can use some workaround... Create table with "Plan" that will be repeated for every day of month. So i can use something like: Matrix plan = IF ( NOT ( ISBLANK ([Fact]) ); [Plan])
Anyway thanks for help!
- Zubair_Muhammad8 years agoCommunity Champion
Hi idontexist
Try this MEASURE.
It works with your sample data
Measure = VAR FirstValue = CALCULATE ( VALUES ( TableName[Plan] ), FILTER ( ALL ( Tablename ), MONTH ( TableName[Date] ) = MONTH ( VALUES ( TableName[Date] ) ) && TableName[Date] = MINX ( FILTER ( ALL ( TableName ), MONTH ( TableName[Date] ) = MONTH ( VALUES ( TableName[Date] ) ) ), TableName[Date] ) ) ) RETURN IF ( NOT ( ISBLANK ( SELECTEDVALUE ( TableName[Fact] ) ) ), FirstValue )