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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
smpa01
Community Champion
Community Champion

Push with expression

@RuiRomanoMS Is there any way for me to incorporate an expression in a push dataset while using the rest api ?

smpa01_0-1720542146877.png

 

 

I tried this which did not work

 

{
  "name": "SalesMarketing",
  "defaultMode": "Push",
  "tables": [
    {
      "name": "t1",
      "columns": [
        {
          "name": "Column1",
          "dataType": "String"
        }
      ],
      "ASMashupExpression": [
        {
          "expression": "let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(\"i45WMlSKjQUA\", BinaryEncoding.Base64),Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 =_t]) in Source"
        }
      ]
    }
  ]
}

or
{
  "name": "SalesMarketing",
  "defaultMode": "Push",
  "tables": [
    {
      "name": "t1",
      "columns": [
        {
          "name": "Column1",
          "dataType": "String"
        }
      ],
      "partitions": [
        {
          "name": "t1",
          "mode": "Push",
          "expression": "let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(\"i45WMlSKjQUA\", BinaryEncoding.Base64),Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t]) in Source"
        }
      ]
    }
  ]
}

 

 

 

// mQuery used

let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSKjQUA", BinaryEncoding.Base64),Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 =_t]) in Source

 

 Thank you in advance


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================
2 REPLIES 2
Anonymous
Not applicable

Hi, @smpa01 

The Power BI REST API doesn't support the use of expressions when creating a push dataset. The data pushed to the dataset should have been processed and ready to be visualized.

If you need to perform transformations or use expressions on your data, you might want to consider doing so before pushing your data to Power BI. This can be done in your own application or with Power Query in Power BI Desktop. Once the data has been transformed, you can use the REST API to push the resulting dataset to Power BI.

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

smpa01
Community Champion
Community Champion

@Anonymous  thanks for looking into it. I have a push datset in production and they were created utilizing PostDataset and PostRow.

 

However, PostDatset has ASMashupExpression definition and I am simply trying to understand what is the purpose of that?


========================
Did I answer your question? Mark my post as a solution!
Proud to be a Super User
My Custom Visualization Projects
• Plotting Live Sound: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.