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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
erenner
New Member

graph count of value after math

Hello again,

 

This is my second time posting this questions, after the first one kicked me out when posting. I'm very new to Power Bi and Dax is completely foregn to me. I'm not sure how to properly ask this question other than by explaining what I am trying to do.

 

Okay. I have multiple customers (A, B, C), that purchased mutliple products (X, Y, Z), in different months (Jan 2020, Feb 2020, etc), and each customer has a non-return rate (0.8, 0.85, 0.9) that the product and date have no impact on. I would like to graph the non-return rate for each customer by product by month.

 

Below is some sample data. In this example. Customer A bought 10 X product in January 2020. They have a non-return rate of 0.8, and therefore I would expect them to return 2 of the 10 I sent them. I would like to graph the 8, that I sent them. I would like to do this for all the products and each month. I for the life of me can't search the right terms to figure this out.

 

Thanks in advance, a frustrated Bi beginner.

CustomerDateProductNon-Return Rate
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A1/1/20X0.8
A2/1/20X0.8
A2/1/20Y0.8
B1/1/20X0.85
B1/1/20Z0.85
C1/1/20X0.90
C2/1/20Y0.90
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @erenner ,

 

Based on your data believe that the return rate is always the same for each customer so you can do the following measure:

 

Non Return = COUNT('Table'[Product]) * AVERAGE('Table'[Non-Return Rate])

 

Be aware that now what comes into action is the way you build your chart. Has you can see in the table below you have a return rate of 8 for january product X customer A then if you select the value in a slicer the line chart returns the correct value.

 

MFelix_0-1611055586872.png

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @erenner ,

 

Based on your data believe that the return rate is always the same for each customer so you can do the following measure:

 

Non Return = COUNT('Table'[Product]) * AVERAGE('Table'[Non-Return Rate])

 

Be aware that now what comes into action is the way you build your chart. Has you can see in the table below you have a return rate of 8 for january product X customer A then if you select the value in a slicer the line chart returns the correct value.

 

MFelix_0-1611055586872.png

 

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you @MFelix . That worked for me. Much appreciated.

 

-erenner

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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