Forum Discussion
DionTN
4 years agoHelper II
Create new table based on calculated functions.
I have some quick measurements and want to make a temporary table like this one: Fullname is a selected field based on filters, the bodycomps are calculated fields. How can I make a temporary ...
- 4 years ago
Hi DionTN ,
Are you instead referring to calculated table? There are more than one ways to do this in Power BI. An example where existing measures are used:
calctable = ADDCOLUMNS ( SUMMARIZE ( FILTER ( 'table', 'table'[column] = "criteria" ), 'table'[column] ), "Measure 1", [Measure 1], "Measure 2", [Measure 2] )
danextian
3 years agoSuper User
I dont see any difference between the two measures in your post. Also there is a second argument in SELECTEDVALUE that returns an alternate result if the original is blank.
SELECTEDVALUE ( 'Table'[Column], "alternate result" )
DionTN
3 years agoHelper II
Im sorry, i had to add this script: This is not filtering the company correct.
calctable =
ADDCOLUMNS (
SUMMARIZE ( FILTER ( usermeasurements, usermeasurements[users.company.Name] = [Bedrijf]),usermeasurements[Fullname]) ,
"Measure 1", [selectFirstDate],
"Measure 2", [selectLastDate], "Measure 3", [BodyComp1], "Measure 4",[BodyComp2]
)