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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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

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

Create calculate column and use either Related or RelatedTable function.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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