Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Abz_17
Helper I
Helper I

Data Aggregation Issue

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. 

 

1 ACCEPTED SOLUTION
Power2G
Frequent Visitor

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!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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.

Power2G
Frequent Visitor

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!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors