Forum Discussion
Supritha1594
2 years agoRegular Visitor
Multiply Average with months count
Hi, I have a requirement where I have to show the target line graph in ascending order. I have to take an average of the selected months revenue and multiply that with the selected months count. ...
DallasBaba
2 years agoSkilled Sharer
Supritha1594, you can modify the SWITCH function to make it more flexible. Here's a revised approach using the following DAX formula:
Target =
VAR SelectedMonths = VALUES('Table'[Month])
RETURN
AVERAGE([Revenue]) *
SUMX(
FILTER(ALL('Table'[Month]), 'Table'[Month] IN SelectedMonths),
RANK.EQ('Table'[Month], 'Table'[Month], 0)
)This way, the formula dynamically adjusts to any range of selected months. You can use this measure in his line graph to achieve the desired results.
Let me know if this works for you. @ me in replies, or I'll lose your thread!!!
Note:
Note:
If this post is helpful, please mark it as the solution to help others find it easily. Also, if my answers contribute to a solution, show your appreciation by giving it a thumbs up!