Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi!
I've been working on a project and now I need to create a Summary Table. The main Table has a column named "Product" where are the products that each worker has made (comma separated) and the column "Proccess Time" shows the respective time of production.
I need to create a Summary Table, like the Excel image below, that calculates the average proccess time if value on column "Product" contains the string in column "Contains". I have tried to create a Table in PowerBI using the functions "Calculate"+"Filter"+"Related", and even using "Summarize", but it didn't work correctly. Could someone help me to understand how can i make this Summary Table?
PS.: in Excel I have used "Avarageif" function to obtain the Summary Table.
Solved! Go to Solution.
@ACT_
Create a table as follows. Assumed you have a table called 'Contain Table' with Contain text.
ADDCOLUMNS(
'Contain Table',
"Avg",
VAR __Txt = 'Contain Table'[Contains]
VAR __TxtFilter = FILTER( ALLNOBLANKROW( Table03[Product] ) , CONTAINSSTRING( Table03[Product] , __Txt ) )
VAR __Result = CALCULATE( AVERAGE( Table03[Proccess Time] ) , __TxtFilter )
RETURN
__Result
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
I started by splitting your data based on the column Product into rows with comma delimiter :
Then I removed the additional spaces :
Then I extracted the product alpha-number like X1, X2...
I created a DAX measure based in the formatted table:
AverageTimeX = CALCULATE(AVERAGE(MyTable[Process Time]), FILTER(MyTable, CONTAINSSTRING(MyTable[ProductName], "X")))
But I fail how you are calculating the average for X, Y and Z
@ACT_
Create a table as follows. Assumed you have a table called 'Contain Table' with Contain text.
ADDCOLUMNS(
'Contain Table',
"Avg",
VAR __Txt = 'Contain Table'[Contains]
VAR __TxtFilter = FILTER( ALLNOBLANKROW( Table03[Product] ) , CONTAINSSTRING( Table03[Product] , __Txt ) )
VAR __Result = CALCULATE( AVERAGE( Table03[Proccess Time] ) , __TxtFilter )
RETURN
__Result
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
38 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |