Forum Discussion
Help with filters
- 6 years ago
Hi gco ,
Could you please try to change the ALL to ALLSELECT Function? If it does not work, could you please also provide the mockup Variance table based on fake data?
%ToGoalYTD = DIVIDE ( SUM ( Goal[Balance] ), CALCULATE ( SUM ( Goal[Value] ), FILTER ( ALLSELECTED ( Variance ), Variance[MonthEndDate] = ENDOFYEAR ( Variance[MonthEndDate] ) ), VALUES ( Variance[BranchName] ) ), 0 )
Best regards,
| BranchName | MonthEndDate | Balance | Value |
| Branch1 | 1/31/2019 | 500 | 600 |
| Branch1 | 12/31/2019 | 750 | 800 |
| Branch1 | 1/31/2020 | 700 | |
| Branch1 | 12/31/2020 | 800 | |
| Branch2 | 1/31/2019 | 400 | 700 |
| Branch2 | 12/31/2019 | 600 | 800 |
| Branch2 | 1/31/2020 | 900 | |
| Branch2 | 12/31/2020 | 1000 |
Here is a sample table.
%ToGoalYTD (Jan 2019) should be = DIVIDE(500/800). With the measure i was using, it is coming up as DIVIDE(500/1600). The YEAREND is combining 12/31/2019 and 12/31/2020 for some reason.
Thank you
Glen
Hi gco ,
Could you please try to change the ALL to ALLSELECT Function? If it does not work, could you please also provide the mockup Variance table based on fake data?
%ToGoalYTD =
DIVIDE (
SUM ( Goal[Balance] ),
CALCULATE (
SUM ( Goal[Value] ),
FILTER (
ALLSELECTED ( Variance ),
Variance[MonthEndDate] = ENDOFYEAR ( Variance[MonthEndDate] )
),
VALUES ( Variance[BranchName] )
),
0
)
Best regards,
- gco6 years agoResolver II
Hi v-lid-msft ,
Your solution was spot on!!! I went and changed my measure from ALL to ALLSELECTED and it shows the correct calculations now. Thank you again for your expertise and for your help on resolving my issue. I owe you big time.
Thank you again
Glen