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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Zbig62
Regular Visitor

number of average values

Hello and I'm asking for help

I need to build a measure that will determine the number of average transactions for a customer and a product that is greater than the assumed parameter, and I have a big problem with it.

The data structure is as follows:

Zbig62_2-1714731197713.png

We have two customers (1 and 2) and two products (A and B). Customer A completed 3 sales transactions for product A. Customer B completed two sales transactions for product A and two for product B.

I built a measure that calculates the average transaction value for the customer and the product:

Zbig62_3-1714731227243.png

I need to build a measure that will determine the number of average transactions for the customer and product greater than the assumed parameter. For example, for parameter "5" the number of average transaction values will be 2 (2 A and 2 B), for parameter “8” the number of average transaction values will be 1 (2 A).

So far all my attempts to build such a measure have ended in failure, although it seems like it should be simple......?

Please help

1 ACCEPTED SOLUTION
Zbig62
Regular Visitor

Thank you very much, everything works, I'm testing the efficiency of the proposed solution
Regards

View solution in original post

2 REPLIES 2
Zbig62
Regular Visitor

Thank you very much, everything works, I'm testing the efficiency of the proposed solution
Regards

ValtteriN
Super User
Super User

Hi,

Here is one way to do this:

Measure 27 = AVERAGE('Table (38)'[Column3])

Measure 28 = COUNTROWS(FILTER(ADDCOLUMNS(SUMMARIZE('Table (38)','Table (38)'[Column1],'Table (38)'[Column2]),"avgM",[Measure 27]),[avgM]>Parameter[Parameter Value]))



End result;

ValtteriN_0-1714739535298.png

 

ValtteriN_1-1714739550044.png

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors