Forum Discussion
Sum and average based on selection
- Anonymous3 years ago
Hi Balhemkan ,
The measure calculates based on the date column. There is no date on the card so that it is blank. You can use KPI visual to show.
Or use another measure in the card.
Measure2 = VAR _min = MIN ( 'Table'[Date] ) VAR _max = MAX ( 'Table'[Date] ) VAR _sales = CALCULATE ( SUM ( volume[Sales] ), FILTER ( volume, volume[month] = MONTH ( _min ) ) ) VAR _diff = DATEDIFF ( _min, _max, MONTH ) + 1 RETURN _sales / _diffBest Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Sorry to bother you. Do you have any update on pbix. I'm completely depending on you.
Hi,
Thank you for your shring the link.
I checked your sample, but I am not sure if it looks like below.
If so, I think the measure shows the correct number.
Or, could you please describe what numbers you want to see as a result?
- Balhemkan3 years agoHelper III
If one month is selected in slicer then it should be 48355.If two months is selected in slicer then it should be 48355/2 =24177.5 like this
- Anonymous3 years agoNot applicable
Hi Balhemkan ,
Please refer to my pbix file to see if it helps you.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Balhemkan3 years agoHelper III
This is not working on card visual and it showing blank. Could you please suggest me