Forum Discussion
Power BI Group By Using DAX Calculated column
- 2 years ago
When you have a visual it automatically applies filters based on the columns in the visual.
In tables this doesn't occur and we have to create those filters.
You could create a column in the same table or create a new calculated table.
I've assumed you are staying in the same table for now.
Schedule columns =
var personname = 'Schedule Details'[Name] --Capture the person
var datestar = 'Schedule Details'[Date Start of week] --Capture the date
return
Calculate( --apply filters
CONCATENATEX(VALUES('Schedule Details'[Job Number]), 'Schedule Details'[Job Number], ", ")
,All('Schedule Details') --Return all rows,'Schedule Details'[Name] = personname , 'Schedule Details'[Date Start of week] = datestar)
--filter to the original rows person and dateMy data is a little sillier than yours...
- 2 years ago
rachaelwalker if you wanted a table it would be something like this.
Home - New TableNew Table =SUMMARIZECOLUMNS('Schedule Details'[Name], 'Schedule Details'[Date Start of week] ,"Job list",CONCATENATEX(values('Schedule Details'[Job Number]), [Job Number],", "))
When you have a visual it automatically applies filters based on the columns in the visual.
In tables this doesn't occur and we have to create those filters.
You could create a column in the same table or create a new calculated table.
I've assumed you are staying in the same table for now.
Schedule columns =
var personname = 'Schedule Details'[Name] --Capture the person
var datestar = 'Schedule Details'[Date Start of week] --Capture the date
return
Calculate( --apply filters
CONCATENATEX(VALUES('Schedule Details'[Job Number]), 'Schedule Details'[Job Number], ", ")
,All('Schedule Details') --Return all rows
,'Schedule Details'[Name] = personname , 'Schedule Details'[Date Start of week] = datestar)
--filter to the original rows person and date
My data is a little sillier than yours...
rachaelwalker if you wanted a table it would be something like this.
Home - New Table
- rachaelwalker2 years agoResolver III
Is there any particular reason I would want to use a table over a column? This was helpful as well. I ended up using a column but I have this formula saved.
- SamWiseOwl2 years agoSuper User
The column can't remove the duplicate rows, since each job list is separate. Using the grouped table created by summarize would.