Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All
I need help on this result that I wish to get
Example:
I want to get the average revenue of customer X based on the last 6 months. (Or any amount of months I choose in the slicer)
So in the slicer I choose the last 6 months (May till Oct) , however customer X does not have revenue every month.
Based on the screenshot below, X only have revenue on June and July. So I need the formula to work this way:
362,640 / 2 = 181,320
Similarly if i choose another customer Y now that only have sales for 4 months.
The formuala should be:
680,254 / 4 = 170,064
Tried using the average function but the result is not accurate.
Any idea how to write this DAX?
(I tried to 1st create a measure to count month if revenue is not blank but i think it is not working. The result is always the number of month i choose in the slicer and not how many months have revenue)
MonthCount =
CALCULATE(
DISTINCTCOUNT('Date'[Month Name]),
NOT(
ISBLANK('Master Sales'[Revenue]
)
))
Solved! Go to Solution.
Hi @Yuiitsu ,
I noticed in the posted image that [Revenue] is not aggregated, at this point it passes a screener up filter to [Average of Revenue ], please try changing [Revenue] to [Sum of Revenue], at this point [Average] should work.
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi @Yuiitsu ,
I noticed in the posted image that [Revenue] is not aggregated, at this point it passes a screener up filter to [Average of Revenue ], please try changing [Revenue] to [Sum of Revenue], at this point [Average] should work.
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
122 | |
80 | |
47 | |
45 | |
35 |
User | Count |
---|---|
178 | |
89 | |
69 | |
47 | |
47 |