Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |