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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Add columns for calculated measure in table

Hello,

 

In my facts table, I have a column for price and distance for every transaction. I want to put a table in my report in which I can see the average, min, max, etc, which should look as follows:

 

MetricPriceDistance
Average$500100miles
Min$20010miles
Max$8001000miles

 

I currently have the average, min, and max as measures, but don't know how a table as shown above. I can only get two seperate tables for Price and Distance, but I want to have it in one table that responds to the filters on the page.

 

Thanks!

1 REPLY 1
VahidDM
Super User
Super User

Hi @Anonymous 

 

Try this code to add a new table:

Table =
UNION (
    ROW (
        "Metric", "Average",
        "Price", AVERAGE ( [price] ),
        "Distance", AVERAGE ( [Distance] )
    ),
    ROW (
        "Metric", "Min",
        "Price", MIN ( [price] ),
        "Distance", MIN ( [Distance] )
    ),
    ROW (
        "Metric", "Max",
        "Price", MAX ( [price] ),
        "Distance", MAX ( [Distance] )
    )
)

 

[price] = Price column 

[Distance] = Distance column

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!!

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors