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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Share with Power BI Enthusiasts: 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

Share with Power BI Enthusiasts: 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.