Forum Discussion

DionTN's avatar
DionTN
Icon for Helper II rankHelper II
4 years ago
Solved

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 table of this to add new calculations on it?

 

 

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

6 Replies

  • 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's avatar
      danextian
      Icon for Super User rankSuper User

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

       

       

      • DionTN's avatar
        DionTN
        Icon for Helper II rankHelper II

        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)
    • DionTN's avatar
      DionTN
      Icon for Helper II rankHelper II

      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: