The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm having trouble with a measure that works well on a daily level - but sums at a weekly level - and I would prefer to see average at a weekly level.
This measure works good for daily:
Day | Week | Store Num | Net Sales | CY Store Count |
1/1/2021 | Week 1 | 100 | $100 | 1 |
1/2/2021 | Week 1 | 101 | $120 | 1 |
1/3/2021 | Week 1 | 102 | $130 | 1 |
1/4/2021 | Week 1 | 103 | $90 | 1 |
1/5/2021 | Week 1 | 104 | $110 | 1 |
1/6/2021 | Week 1 | 105 | $130 | 1 |
1/7/2021 | Week 1 | 106 | $100 | 1 |
Current Result: CY Store Count | 7 | |||
Desired Result: Avg Weekly Store Count Per Day | 1 | |||
Solved! Go to Solution.
@Quinnie2017 use AVERAGEX
Avg Weekly = AVERAGEX( VALUES (Table[Date] ), [CY Sales Store Count])
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Quinnie2017 correct, values give you a table of unique values of the column you have in the values function.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Quinnie2017 use AVERAGEX
Avg Weekly = AVERAGEX( VALUES (Table[Date] ), [CY Sales Store Count])
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
This works - thanks!
To make sure I understand what DAX is doing:
It is looking at the number of values in [Date], which in this case is 7 because it is one week, and making that 7 the denominator. And the numerator is [CY Sales Store Count]. The end result it the average of [CY Sales Store Count] / 7.
Is that right?