Forum Discussion
Multiply Average with months count
Supritha1594 you can navigate to the “Fields” pane. Locate the table housing the revenue data you wish to utilize. Proceed to the “Modeling” tab and select the “New Measure” button.
In the formula bar, input the following formula:
Target = AVERAGE([Revenue]) * SWITCH(SELECTEDVALUE('Table'[Month]), "June", 1, "July", 2, "August", 3, 0)Ensure to rename “Table” with the accurate name of the table containing the month data, “Revenue” with the appropriate column name for revenue data, and “Month” with the column name for month data. Once done, save the measure and integrate it into your line graph.
This measure will calculate the average revenue for the selected months and multiply it by the number of months chosen. The SWITCH function will return 1 for June, 2 for July, 3 for August, and 0 for any other month. This will ensure that the count is correct for the selected months.
Note:
- Supritha15942 years agoRegular Visitor
DallasBaba thank you for your response!
But everytime it won't be june, july, and august. User may select any range of months. For example if an user selects January and february then it should be 1 for january and 2 for february. Is it possible in that way?