Forum Discussion
Repeat values based on other value
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
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 )- idontexist8 years agoHelper I
It return me an error. Words in Russian could be translated as "Error during calculating measure...".
- Zubair_Muhammad8 years agoCommunity Champion
Hi idontexist
Please try replacing
VALUES (Local Measure[Measure Quantity])
with
SUM (Local Measure[Measure Quantity])
- idontexist8 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.