Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have an issue to calcaluate average of sales, cost, and commodity% when multiple months are selected from Slicer.
I have a table visual and month slicer as seen below
The month Slicer is defaulted to select only one month and displaces the table visual above. The measure used was sum of Sales, cost, and Commodity% which works fine for only one month selected in the slicer. However, whenever I select multiple months, i was to calculate the average of Sales, Cost% and Commdity%, hence it should look like this
Sales, cost, and commodity calculate it average based on the months selected in the Slicer. But Commodity% remains the same.
How can i achieve this to calculate weighted average od sales, cost and Commodity% using dax.
Solved! Go to Solution.
@Anonymous , if sales is a measure and you need month avg then try like
AverageX(Values(Date[Month Year]), [Sales] )
Assumed [Month Year] from date table
@Anonymous , if sales is a measure and you need month avg then try like
AverageX(Values(Date[Month Year]), [Sales] )
Assumed [Month Year] from date table
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |