Forum Discussion
gabrielvigo
8 years agoHelper I
Enter data in variables
Hi everyone! I have a static date filter in one measure. For ecample: Today() -1. But I need that this filter, Today()-1, calculate about selction date. I need this, because some measures a...
- 8 years ago
Hi gabrielvigo,
Try these formulas below.
Test = CALCULATE ( SUM ( Supply_Chain[Operations Stockouts] ); FILTER ( ALL ( 'Calendar'[Fecha] ); 'Calendar'[Fecha] = SELECTEDVALUE ( 'Calendar'[Fecha] ) ) )Test2 = CALCULATE ( SUM ( Supply_Chain[Operations Stockouts] ); FILTER ( ALL ( 'Calendar'[Fecha] ); 'Calendar'[Fecha] <= SELECTEDVALUE ( 'Calendar'[Fecha] ) ) )Best Regards,
Dale
gabrielvigo
8 years agoHelper I
Hi.
No, I can't calculate them.
I need 2 calculations:
- Test = CALCULATE(SUM(Supply_Chain[Operations Stockouts]);'Calendar'[Fecha] = SELECTEDVALUE('Calendar'[Fecha]))
- Test2 = CALCULATE(SUM(Supply_Chain[Operations Stockouts]);'Calendar'[Fecha] <= SELECTEDVALUE('Calendar'[Fecha]))
v-jiascu-msft
8 years agoMicrosoft Employee
Hi gabrielvigo,
Try these formulas below.
Test =
CALCULATE (
SUM ( Supply_Chain[Operations Stockouts] );
FILTER (
ALL ( 'Calendar'[Fecha] );
'Calendar'[Fecha] = SELECTEDVALUE ( 'Calendar'[Fecha] )
)
)
Test2 =
CALCULATE (
SUM ( Supply_Chain[Operations Stockouts] );
FILTER (
ALL ( 'Calendar'[Fecha] );
'Calendar'[Fecha] <= SELECTEDVALUE ( 'Calendar'[Fecha] )
)
)
Best Regards,
Dale