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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.