EXHIBIT 23.1
![](https://capedge.com/proxy/S-8/0000950142-20-000704/eylogo.jpg)
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in the Registration Statement (Form S-8) pertaining to the Share Unit Plan of TransAlta Corporation of our reports dated March 3, 2020 with respect to the consolidated statements of financial position as at December 31, 2019 and 2018 and the consolidated statements of earnings (loss), comprehensive income (loss), changes in equity and cash flows for each of the years in the three year period ended December 31, 2019 of TransAlta Corporation, and the effectiveness of internal control over financial reporting of TransAlta Corporation as of December 31, 2019, included in its Annual Report (Form 40-F) dated March 3, 2020 filed with the Securities and Exchange Commission.
/s/ Ernst & Young LLP | |
Chartered Professional Accountants |
Calgary, Alberta
March 4, 2020