Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
Im having difficulty to write DAX formula to accommodate both situations below:
- Situation 1: Filter by channel, Avg Daily Sales = MTD Sales / Actual Selling Days (by each channel)
- Situation 2: No filter, Avg Daily Sales = MTD Sales (Total) / Actual Selling Days (by Main Channel)
Existing formula, works for Situation 1 but not for Situation 2
Actual ADS =
sum(MTD Sales)/
max(Actual selling days)
Sample data:
| Channel | Actual selling days | MTD Sales | Avg daily sales |
| Main Channel | 8 | 100 | 13 |
| Sub channel 1 | 9 | 50 | 6 |
| Sub channel 2 | 5 | 50 | 10 |
Total MTD Sales = 200
Avg Daily Sales = 200/ 8 = 25
Thanks much for your help!
Solved! Go to Solution.
@milkynight Perhaps use ISFILTERED or HASONEVALUE?
@Greg_Deckler Thanks, I haven't known about these 2 before. Let me try to see if it works!
@milkynight Perhaps use ISFILTERED or HASONEVALUE?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 9 | |
| 8 | |
| 8 |