Forum Discussion
Dynamic calculations according to slicer value
- 3 years ago
Hi slackerhx ,
According to your description, in the chart, the Year column is in the X-axis, so you shouldn't use "ALLSELECTED([Year])" in the formula, which will ignore current year in the X-axis and take all years into consideration.
Modify the formula to:
Measure = CALCULATE ( SUM ( Table1[HC] ), ALLSELECTED ( Table1[ID] ) ) * SELECTEDVALUE ( 'Agility Ratio'[Agility Ratio] )Get the correct result in my sample.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yanjiang-msft ,
Yes, there is no relationship between Agility Ratio table and Table 1.
Based on my current DAX formula, each year will have the same result, despite a change in HC column each Year. Please see graph:
Incorrect
The correct DAX formula should produce Workstations Required which varies according to the HC column in each year.
Correct
- v-yanjiang-msft3 years ago
Community Support
Hi slackerhx ,
According to your description, in the chart, the Year column is in the X-axis, so you shouldn't use "ALLSELECTED([Year])" in the formula, which will ignore current year in the X-axis and take all years into consideration.
Modify the formula to:
Measure = CALCULATE ( SUM ( Table1[HC] ), ALLSELECTED ( Table1[ID] ) ) * SELECTEDVALUE ( 'Agility Ratio'[Agility Ratio] )Get the correct result in my sample.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.