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
madhushree
Frequent Visitor

Measure not giving the value proper

Measure not giving the value proper:
I have used below measure to calculate the revenue based on year-month field.
Price = sum('table'[amount])
And it is giving me wrong result!!
Below screenshot shows what exactly i needMeasure not giving the value proper:
I have used below measure to calculate the revenue based on year-month field.
Price = sum('table'[amount])
And it is giving me wrong result!!

Here price is getting doubled sometimes dont know why?!!

Can anyone help me with this.
Capture.PNG

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@madhushree

 

You must have other columns/filters to slice your measure. Otherwise your amount should aggregate on Year-Month fields. Even you select "do not aggregate". The amount must be separated based on other group column. You may change your measure into:

 

Price =
CALCULATE (
    SUM ( Table[Amount] ),
    ALLEXCEPT ( Table, Table[Year-Month], Table[Group] )
)

Regards,

 

View solution in original post

2 REPLIES 2
v-sihou-msft
Employee
Employee

@madhushree

 

You must have other columns/filters to slice your measure. Otherwise your amount should aggregate on Year-Month fields. Even you select "do not aggregate". The amount must be separated based on other group column. You may change your measure into:

 

Price =
CALCULATE (
    SUM ( Table[Amount] ),
    ALLEXCEPT ( Table, Table[Year-Month], Table[Group] )
)

Regards,

 

mattbrice
Solution Sage
Solution Sage

Assuming you have put 'Ar maned' and 'Amount' on the "rows" of the visual, then for example in your third row shown, your measure SUM('table'[amount]) will sum up all the values in 'table' where Ar maned = 201705 and Amount = 28.95.  So you must have 2 rows in the table that match this criteria which is why you are getting the results doubled like you are.  Some rows meet the criteria twice (or more.  At bottom of visual i see some results 4x Amount).

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.