Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Need some help please. I have a Power BI report which has been produced using an Excel data source, for which I have created a frequency metric (calculated donations/donors). There are also a few slicers on the report for reporting month and ethnicity. For some reason, when multiple selections are made on ethnicity, the frequency metrics aggregates the number on instead of adjusting to the correct number. Is there any DAX that can fix this issue? I have tried creating the frequency metric in Power BI as well, but no joy. Any help would be appriciated.
Solved! Go to Solution.
This issue occurs because your DAX measure might not be correctly handling the slicer selections and is summing up instead of averaging based on the unique donor count. Try doing somehing like this.
Frequency =
VAR UniqueDonors = DISTINCTCOUNT( Donations[DonorID] )
RETURN
DIVIDE( SUM( Donations[Amount] ), UniqueDonors, 0 )If your frequency metric is in a table that is affected by slicers, wrap the calculation in CALCULATE to ensure it respects slicer selections.
Frequency =
VAR UniqueDonors = CALCULATE( DISTINCTCOUNT( Donations[DonorID] ), ALLSELECTED(Donations[Ethnicity]) )
RETURN
DIVIDE( SUM( Donations[Amount] ), UniqueDonors, 0 )This will ensure that when multiple are selected, the correct unique donor count is used rather than incorrectly summing across selections.
Let me know if this helps!
Hi,Power2G ,thanks for your concern about this issue.
Your answer is excellent!
And I would like to share some additional solutions below.
Hello,@Abz_17 .I am glad to help you.
Has your problem been solved?
For your measure, I think it may be due to the complexity of the filtering environment that the end result of the measure is incorrect. You can try to use ALLEXCEPT or ALLSELECTED function in your measure to limit the filter fields.
The ALLEXCEPT function removes other filters while preserving the filtering context of a particular column, ensuring that the frequency measure is calculated correctly even if multiple slicers are selected.
Alternatively, use the CALCULATE and FILTER functions to artificially specify the computational context in the measure (suggested by Power2G)
How to Get Your Question Answered Quickly - Microsoft Fabric Community
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This issue occurs because your DAX measure might not be correctly handling the slicer selections and is summing up instead of averaging based on the unique donor count. Try doing somehing like this.
Frequency =
VAR UniqueDonors = DISTINCTCOUNT( Donations[DonorID] )
RETURN
DIVIDE( SUM( Donations[Amount] ), UniqueDonors, 0 )If your frequency metric is in a table that is affected by slicers, wrap the calculation in CALCULATE to ensure it respects slicer selections.
Frequency =
VAR UniqueDonors = CALCULATE( DISTINCTCOUNT( Donations[DonorID] ), ALLSELECTED(Donations[Ethnicity]) )
RETURN
DIVIDE( SUM( Donations[Amount] ), UniqueDonors, 0 )This will ensure that when multiple are selected, the correct unique donor count is used rather than incorrectly summing across selections.
Let me know if this helps!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 143 | |
| 123 | |
| 102 | |
| 79 | |
| 54 |