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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Neale70
New Member

PowerBi Query Transformation creating a a new column and using MaxDate(?)

Hi All. Relatively new to PowerBi and need some help for this transformation in PowerQuery. Thought it best to make a diagram rather than type a huge essay  to explain what I am trying to achieve ! I am basically trying to calculate profit / loss on transactions that have been made over a period of time. The profit/loss needs to be made/posted when the final sale has happened. I hope this makes some sense. Thanks.

Screenshot 2020-11-02 142119.png

 

1 ACCEPTED SOLUTION

@Neale70 

M and DAX are different. you need to close the power query editor and click the new column button which is under the modeling tab.

1.PNG





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

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Neale70 

I think you can use DAX to create a new column

1.PNG

Column = CALCULATE(MAX('Table'[TRADE DATE]),ALLEXCEPT('Table','Table'[CODE]))

 

 





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

Proud to be a Super User!




Hi Ryan,

 

Many thanks for your help. Appologies for my delayed response. I have tried numerous versions of below but seem to hit errors. Probably my lack of M programming/syntax. TRAN TABLE is the name of the table I generate in the query. Am trying to use the exact sytac you have provided but when using fully quallified name for table & column it suggests I put in " "...any advise appreciated. Thanks 

 

Neale70_0-1604405208314.png

 

@Neale70 

M and DAX are different. you need to close the power query editor and click the new column button which is under the modeling tab.

1.PNG





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

Proud to be a Super User!




Hi Ryan.

 

Thanks very much for the help AND explaining the M versue PQ - fundamental.

 

😀

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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