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
Anonymous
Not applicable

DAX Category - Avg Sales month

Hi Every one,

 

I have data like below

 

DateCategoryValues
01-01-2017AH M97
01-01-2017AH N88
01-01-2017AH P87
01-01-2017UBS97
01-01-2017YFI68
01-01-2017UUU78
01-02-2017AH M81
01-02-2017AH N64
01-02-2017AH P64
01-02-2017UBS83
01-02-2017YFI78
01-02-2017UUU74
01-03-2017AH M94
01-03-2017AH N75
01-03-2017AH P74
01-03-2017UBS60
01-03-2017YFI95
01-03-2017UUU91
01-04-2017AH M63
01-04-2017AH N90
01-04-2017AH P99
01-04-2017UBS92
01-04-2017YFI80
01-04-2017UUU80
01-05-2017AH M62
01-05-2017AH N76
01-05-2017AH P75
01-05-2017UBS99
01-05-2017YFI63
01-05-2017UUU78

 

Output file should be like below

 

CategoryValues
AH M0.794
AH N0.786
AH P0.798
UBS0.862
YFI0.768
UUU0.802

 

 

I have writen formual in excel (=(SUM(Balance!C2,Balance!C8,Balance!C14,Balance!C20,Balance!C26)/5)/100)

 

i want to wirte same funtion in "DAX" - can any body help on this.

 

Thanks in advance.....

 

regards

Venu

2 ACCEPTED SOLUTIONS

@Anonymous ,

 

Check the measure below as well.

Measure =
AVERAGEX ( VALUES ( Table1[Date] ), CALCULATE ( SUM ( Table1[Values] ) ) ) / 100
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@Anonymous ,

 

Just drag the measure into a table visual.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
ElenaN
Resolver V
Resolver V

Hello,

 

You can create a new measure = AVERAGE([Values])/100 and format it to show 3 digits.

 

Regards,

ElenaN

Anonymous
Not applicable

@ElenaN  Thanks for your response, but this not right way...

@Anonymous ,

 

Check the measure below as well.

Measure =
AVERAGEX ( VALUES ( Table1[Date] ), CALCULATE ( SUM ( Table1[Values] ) ) ) / 100
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft Thanks for your response..

 

i explain what i am expecting..... for example: i need to calculate "AH M" category avg (process like below)

 

01-01-2017AH M97
01-02-2017AH M81
01-03-2017AH M94
01-04-2017AH M63
01-05-2017AH M62
 Total397
 Avg79.4
 Avg / 1000.794

 

 

1. First i need to do sum (=SUM(I2:I6))

2. Second need to do AVG (=I7/5)

3. third need to do AVG / 100 (=I8/100)

 

this is my approach, i need category wise avg output should come like below.....

 

CategoryValues
AH M0.794
AH N0.786
AH P0.798
UBS0.862
YFI0.768
UUU0.802

 

 

Can anybody help on this..... Thanks in advance....

 

Regards

Venu

Anonymous
Not applicable

Anybody help on this...

@Anonymous ,

 

Just drag the measure into a table visual.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft  table level values has come perfect,  but total sum has come incorrect. 

 

Sum-Not-Correct.jpg

 

can you help on this....

 

Regards

Venu

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.