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
ironboy0418
Helper II
Helper II

How to return a value without aggregating the sum of each rows by using new measure or dax?

I have a sample table in Power BI that has repeating value for price. The objective is to return the prices for each category without summing-up all the values in row price.

 

Sample table:

ironboy0418_0-1681902148085.png

 

 

Desired output:

ironboy0418_1-1681902160373.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @ironboy0418 

there are many ways:

you can just plot a table visual with category and price columns. Choose min, max or average for price column.

or
plot a table visual with category columns and a measure like:
measure = MIN(TableName[Price])

or
create a calculated table like:
Table =
ADDCOLUMNS(
VALUES(TableName[Category]),
"Price",
CALCULATE(MIN(TableName[Price]))
)

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @ironboy0418 

there are many ways:

you can just plot a table visual with category and price columns. Choose min, max or average for price column.

or
plot a table visual with category columns and a measure like:
measure = MIN(TableName[Price])

or
create a calculated table like:
Table =
ADDCOLUMNS(
VALUES(TableName[Category]),
"Price",
CALCULATE(MIN(TableName[Price]))
)

barritown
Super User
Super User

Hi,

Why don't you just a table visual, add Category & Price to its Values field and then choose Average or Median in the options for aggregation?

barritown_0-1681906108832.png

Best Regards,

Alexander

My YouTube vlog in English

My YouTube vlog in Russian

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.

Top Solution Authors