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.
Hi all! I need some help here...
I´m trying to create a table with sales forecast per store, based on last days in this week / month / period of time.
I would like to create a table with stores in the rows, and date in the columns.
For each date (if less than today), I must put the actual sales value. If the date is later, the field must be completed with the average of the last days of the table (yellow marks in the table below). For security reasons, I can not put the true values...
How can I do this?
Best regards,
Lucas
Solved! Go to Solution.
Hi @Anonymous ,
Refer to the sample.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try like
new column =
var _olddate = maxx(filter('Table','Table'[store] = earlier( 'Table'[store]) && 'Table'[Date] < earlier( 'Table'[Date])), 'Table'[Date])
return
AvergaeX(filter('Table','Table'[store] = earlier( 'Table'[store]) && 'Table'[Date] =_olddate ),'Table'[sales])
@Anonymous - I would unpivot your week columns and then you can use EARLIER. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586
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 |
---|---|
113 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |