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
icturion
Resolver II
Resolver II

Power Query to DAX

I have the following Power Query that works fine in a normal table.Power Query.JPG

But now i want to use the same formule in a DAX table but thats not possible for so far i know.

So the question is can somebody help me by writing the formule in DAX?

 

9 REPLIES 9
amitchandak
Super User
Super User

@icturion , Try like

Summarize(
union(
selectcolumns(Table, "Date", Table[datein], "Work1", [Work1], "Work2", 0, , "Work3", 0),
selectcolumns(Table, "Date", Table[dateout], "Work1", 0, "Work2", [Work2] , "Work3", 0),
selectcolumns(Table, "Date", Table[datecheck], "Work1", 0, "Work2", 0 , "Work3", [Work3])
), [Date], "Work1", sum([Work1]), "Work2", sum([Work2]), "Work3", sum([Work3]), "Total", sum([Work1])+sum([Work2])+sum([Work3]))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Where do i need to place the formula?

 

Within tabel1? As a Calculated column or measure?

If i place it in a measure i get the following error:
error.JPG

Can't find table with column [work1]

smpa01
Community Champion
Community Champion

@icturion Where do i need to place the formula?

 

Capture.PNG


========================
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
========================

@icturion , that is new table 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak If i place it in a new table is still get the same error.

icturion_0-1614706936139.png

Unable to identify the column [work1] in the table

@amitchandak 

 

From this table 'tabel1':
Table1.JPG

 

I want to create a new table using DAX that shoud have this as a result:
correct.JPG

 

if i use your formula to create a new table i get the following:
get.JPG
Are I am doing something wrong?

Hi @icturion ,

 

Please provide a sample .pbix file or sample data that can be copied.

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

@icturion ,Can you share sample data and sample output in table format?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 
Sample data tabel1
Table1.JPG

Result tabel2:
tabel2.JPG

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.

Top Solution Authors