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
EvertonRosa
Helper I
Helper I

Create Table based on columns and measures

Community, I need a little help!

 

Is there any way to create a table based on a column and a measure? Let me explain the case:

I have a PRODUCTS table with a column called family_name. Each product has its own family. Ex:

 

productfamily_name
1AAA
2AAB
3AAC
4AAD
5AAE

 

I have a measure that CALCULATE the Time to Win for each opportunitie on table OPPORTUNITIES. Ex: 

 

Time to Win (Family) =
CALCULATE(
    AVERAGEX(
        SUMMARIZE(
            FILTER(fOportunities,fOportunities[statecode] = 1),
            fOportunities[opportunityid],
            dProducts[family_name],
            "AvgDays",MAX(fOportunities[DaystoClose])
        ),
        [AvgDays]
    ),
    USERELATIONSHIP(dCalendar[ID Data],fOportunities[actualclosedate])
)

Now, I wloud like to generate a table like this: 
family_nameTime to Win
AAA5
AAB10
AAC15
AAD20
AAE25

 

I have tried to aproach using SUMMARIZE, ADDCOLUMN but I couldn´t figure out how to do it. Any help?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@EvertonRosa , if you create calculated table, the measure can not take slicer value and calculation may not go as planned and will be static

 

Add a new column, using addcolumns, and use related , relatedtable, or simple max function work across the table

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@EvertonRosa , if you create calculated table, the measure can not take slicer value and calculation may not go as planned and will be static

 

Add a new column, using addcolumns, and use related , relatedtable, or simple max function work across the table

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks, @amitchandak. I found a solution after watch your videos. 

Create calculate column and use either Related or RelatedTable function.

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.