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
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 )idontexist
8 years agoHelper I
It also didn't help. But i have figured out how i can do that. It's almost looks like my first formula:
Matrix plan = IF ( NOT ( ISBLANK ( [Compliant Distribution] ) ); CALCULATE(sum('Local Measure'[Measure Quantity]);'Date'[Day Of Month]=1))
It just didn't show me correct values if i use "date" in fields:
But if i add "Day of Month" which i use in formula, instead of "Date" it will calculate as i want. Only without total sum, unfortunately.