Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi, I need help with this case.
Stock = Current stock
Sold = Sold value will change following the control date. (This one not the problem)
--
Average Sales is problem.
What I want to do in Average Sales:
If Control Date 7/1/23 - 7/31/23 is 31 Days
Average Sales = Sold/31
If Control Date 7/1/23 - 7/7/23 is 7 Days
Average Sales = Sold/7
Basically, the Control Date will be the divisor for the value Sold and become Average Sales
--
Stock/AVG = Current Stock divine by Average Sales
--
to fin the number of days , simply use a countrows function
COUNTROWS('table of your slicer[date]))
then do a sold/[new measure]
Hi!
I can see two ways to achieve the solution
First:
Avg Sales = DIVIDE ( SUM ( Sales ) , COUNTROWS ( Calendar_Table ) )
Second,
Avg Sales = AVERAGEX ( VALUES ( Calendar_Table[Date] ), SUM ( Sale ) )
Hi Grego,
Not working well.
It's possible to count value Slincer?
I have try to count range 7/2/2023 tp 7/12/2023 but its count 31..
I use this mesaure:
No. You will need to create a calendar table. I believe finishing this measure using the automatic date hierarchy will be very hard.
Thanks Grego..
So If We can't measure using the automatic date. Can we divide it by the picked value?
I just create "Divide Average" Table
And inside it only 1 column and with value row 7,10,15 &30
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
9 | |
8 | |
8 |