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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Inserting records from source with DAX

I am trying to figure out how to insert records from a new source from DAX. I imagen it would look something close to this. Assuing the table name is users and the column is Manager. I would be greatful for any help.

 

Table.InsertRows(#"Renamed Columns", 0,{Table.SelectRows(Table.SelectColumns(Source{[Name="users"]}[Data],{"Manager"}),"Manager")}

1 ACCEPTED SOLUTION

This doesn't sound like it has anything to do with inserting or DAX...

 

I can't tell for sure but it sounds like you might be trying to create a cross join (a.k.a Cartesian product) of Names and Quarters.

https://radacad.com/cartesian-product-in-power-query-multiply-all-sets-of-all-pairs-in-power-bi

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Lets say I am trying geting data from a new source 3 names.

Larry

Mary

Mark

I need to add some calcuated dates for each name per quarter. Like this

 

Larry   1/1/2022

Larry   4/1/2022

Larry   7/1/2022

Larry   10/1/2022

Mary   1/1/2022

Mary   4/1/2022

Mary   7/1/2022

Mary   10/1/2022

Mark   1/1/2022

Mark   4/1/2022

Mark   7/1/2022

Mark   10/1/2022

 

I know I can apply the dates with something like this Date.AddQuarters(Date.StartOfYear(Date.From(DateTime.FixedLocalNow())),0)

but I dont know how to loop and itirate each name so it comes out that way when I am inserting the rows.

 

Let me know if this make sense.

Anonymous
Not applicable

Hi @Anonymous ,

 

Agree with @AlexisOlson .

And in Power BI Desktop, you can use the CROSSJOIN()  function to returns a table that contains the Cartesian product of all rows from all tables in the arguments. The CROSSJOIN() function is DAX language.

 

Best Regards,

Stephen Tao

 

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

This doesn't sound like it has anything to do with inserting or DAX...

 

I can't tell for sure but it sounds like you might be trying to create a cross join (a.k.a Cartesian product) of Names and Quarters.

https://radacad.com/cartesian-product-in-power-query-multiply-all-sets-of-all-pairs-in-power-bi

AlexisOlson
Super User
Super User

I don't quite understand how DAX is involved. Are you trying to load data from a DAX calculated table/column into a query in the same pbix file? If so, you're out of luck. DAX calculated tables/columns are evaluated after all the queries load and cannot be referenced in the query editor.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors