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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DionTN
Helper II
Helper II

Create new table based on calculated functions.

I have some quick measurements and want to make a temporary table like this one:

DionTN_0-1661170330512.png

Fullname is a selected field based on filters, the bodycomps are calculated fields. How can I make a temporary table of this to add new calculations on it?

 

 

1 ACCEPTED SOLUTION
danextian
Super User
Super User

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]
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

6 REPLIES 6
danextian
Super User
Super User

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]
)




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

You can use VAR but depending on how you use it, it may or may not result your desired result. See samples below:

danextian_0-1661212327304.png

danextian_1-1661212361580.png

danextian_2-1661212372159.png

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

The table is working, only the filter is not working. Is there anything i can do?

Bedrijf = 
var selectie = SELECTEDVALUE(company[Name])
return
IF(isblank(selectie),"Geen bedrijf geselecteerd",selectie)

The company selection, which is made in a seperate calculation is unfortunately not working.

Bedrijf = 
var selectie = SELECTEDVALUE(company[Name])
return
IF(isblank(selectie),"Geen bedrijf geselecteerd",selectie)

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" )





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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]
)

is it also possible to ad a var in this table? @danextian 

 

 

 

calctable = 
ADDCOLUMNS (
    SUMMARIZE ( FILTER (usermeasurements, usermeasurements[users.company.Name] = [Bedrijf]), usermeasurements[Fullname]  ),
    "Measure 1", [FirstValue],
    "Measure 2", [LastValue]
)

 

 

Now i tried this without succes: 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.