
205 P.3d 812 (2009)
2009 MT 120
350 Mont. 171
Robert J. BEASLEY, Petitioner and Appellant,
v.
FLATHEAD COUNTY BOARD OF ADJUSTMENTS, Respondent and Appellee.
No. DA 08-0192.
Supreme Court of Montana.
Submitted on Briefs February 19, 2009.
Decided April 8, 2009.
*813 For Appellant: Tammi E. Fisher, Fisher Law Firm, Kalispell, Montana.
For Appellee: Jonathan B. Smith, Office of the County Attorney, Kalispell, Montana.
Justice BRIAN MORRIS delivered the Opinion of the Court.
¶ 1 Robert J. Beasley (Beasley) appeals from an order of the Eleventh Judicial District Court, Flathead County, that granted Flathead County Board of Adjustment's (Board) motion to dismiss. We affirm.
¶ 2 We review the following issues on appeal:
¶ 3 Did the District Court properly grant the Board's motion to dismiss?
¶ 4 Did the District Court properly determine that § 76-2-227, MCA, provided Beasley an adequate remedy?

PROCEDURAL AND FACTUAL BACKGROUND
¶ 5 The Flathead County Board of Commissioners (Commissioners) created the Board pursuant to § 76-2-221, MCA. The Commissioners adopted the Flathead County Zoning Regulations (regulations or FCZR). The regulations, in turn, established the position of Zoning Administrator (Administrator).
¶ 6 The Board granted a conditional use permit (CUP) to Arthur and Dorothy Hanson (the Hansons) on June 3, 1997. The Hansons owned real property located on Farm to Market Road in Kalispell, Flathead County, Montana. The CUP allowed a gravel pit operation.
¶ 7 Beasley purchased the Hansons' real property on Farm to Market Road on April 7, 2005. The Administrator initially determined that a valid CUP for gravel extraction remained with the property. The Flathead Citizens for Quality Growth (Citizens) appealed the Administrator's decision to approve the transfer of the CUP to Beasley as the new owner. The Board denied the transfer of the CUP to Beasley on June 6, 2006.
¶ 8 Beasley appealed the Board's decision to the District Court on June 30, 2006. Beasley filed a petition for writ of certiorari, pursuant to § 76-2-227, MCA. Citizens intervened to defend the Board's decision. Beasley, through his former counsel, moved to dismiss with prejudice the writ of certiorari on February 5, 2007, before the District Court had issued any decision. The District Court dismissed with prejudice Beasley's petition for writ of certiorari on March 2, 2007.
¶ 9 Beasley eventually filed a petition for writ of mandamus on December 19, 2007. Beasley alleged that the Board had denied the transfer of the CUP without providing any grounds for its determination to deny the transfer and without authority to deny it. Beasley contended that the Board had no record of its proceedings and that the Board had failed to provide a record to Beasley. Beasley claimed that he had expended over $2 million in reliance upon his ability to extract gravel from the property. Beasley alleged that he had exhausted any and all available administrative remedies. Beasley further alleged that he had no plain, speedy, and adequate remedy in the ordinary course of law other than the remedies sought by his mandamus petition.
¶ 10 The Board filed a motion to dismiss on January 28, 2008. The Board argued that Beasley incorrectly had used a writ of mandamus for the relief that he had requested. The Board claimed that a mandamus petition did not lie to correct a previously made decision or to control discretion. The Board further alleged that Beasley had a plain, speedy, and adequate remedy available.
*814 ¶ 11 The District Court granted the Board's motion to dismiss. The court agreed with the Board that a writ of mandamus is not an appropriate mechanism for the relief that Beasley had requested. The court cited the fact that the Board already had denied the transfer of the CUP to Beasley and mandamus does not lie to correct or undo an action already taken. The District Court further pointed out that § 76-2-227, MCA, provides a remedy for the court's review of an alleged illegal decision by the Board. The absence of appropriate finding of fact, or any findings of fact, in support of the Board's decision did not preclude Beasley from pursuing a writ of review or certiorari under this statute. The court determined that Beasley had a plain, speedy and adequate remedy at law that rendered mandamus inapplicable. Beasley appeals.

STANDARD OF REVIEW
¶ 12 We review de novo a district court's ruling on a motion to dismiss. Doty v. Mont. Com'r of Political Practices, 2007 MT 341, ¶ 9, 340 Mont. 276, 173 P.3d 700. Dismissal is proper if the plaintiff would not be entitled to relief based on any set of facts that could be proven to support the claim. Doty, ¶ 9. A determination of whether a complaint states a claim presents a conclusion of law that we review for correctness. Doty, ¶ 9.

DISCUSSION
¶ 13 Did the District Court properly grant the Board's motion to dismiss?
¶ 14 Beasley argues that a writ of mandamus represents the appropriate mechanism to compel the Board to perform its clear duty to carry out the express provisions of FCZR § 2.06.060. Beasley contends that the Board's 1997 approval of the CUP placed it in perpetual status pursuant to FCZR § 2.06.060(1). Beasley argues that, once granted, the CUP shall "run with the lot, building, structure, or use and shall not be affected by change of ownership." FCZR § 2.06.060(1). Beasley thus claims that the CUP's perpetual nature made its transfer into Beasley's name a mere ministerial task.
¶ 15 At the outset, we note that a writ of mandate will not lie to correct or undo an action already taken. State ex. rel. Popham v. Hamilton City Council, 185 Mont. 26, 29, 604 P.2d 312, 314 (1979). An action already done cannot be undone by mandamus, however erroneous it may have been. Popham, 185 Mont. at 29, 604 P.2d at 314. In Popham, the petitioner prayed for the district court to issue a writ of mandamus directing the city, among other things, to rescind its approval of a child care center. Popham, 185 Mont. at 27-28, 604 P.2d at 313. The district court dismissed the petition and this Court affirmed. Popham, 185 Mont. at 29, 604 P.2d at 314. The Court determined that the approval of the child care center as a permissible use, whether accomplished by an erroneous procedure, remained a past and completed act not reviewable by a writ of mandate. Popham, 185 Mont. at 29, 604 P.2d at 314. Popham applies here. The Board's decision to deny the transfer of the CUP to Beasley is a completed act that is not reviewable by a writ of mandate. Popham, 185 Mont. at 29, 604 P.2d at 314.
¶ 16 Beasley also has difficulty satisfying the two-part standard to qualify for the issuance of a writ of mandate. Becky v. Butte-Silver Bow Sch. Dist. 1, 274 Mont. 131, 135, 906 P.2d 193, 195 (1995). The writ is available where the party who applies for it is entitled to the performance of a clear legal duty by the party against whom the writ is sought. Section 27-26-102(1), MCA; Smith v. County of Missoula, 1999 MT 330, ¶ 28, 297 Mont. 368, 992 P.2d 834. The district court must grant a writ of mandate if a clear legal duty exists and no speedy and adequate remedy is available in the ordinary course of law. Section 27-26-102(1)(2), MCA, Smith, ¶ 28. The clear legal duty must involve, however, a ministerial act. Smith, ¶ 28.
¶ 17 We consider an act to be ministerial where the law prescribes and defines the duty to be performed with such precision and certainty as to leave nothing to the exercise of discretion or judgment. Smith, ¶ 28. Where the act to be done involves the exercise of discretion or judgment, however, it is not deemed merely ministerial. Smith, ¶ 28. *815 Beasley contends that FCZR § 2.06.060, required the Board to approve his transfer. He contends, therefore, that the Board's approval would be a ministerial act. Our review of the regulations shows that the Board exercised discretion in denying Beasley's CUP transfer.
¶ 18 FCZR § 2.01.010, provides that the Administrator shall administer, interpret, and enforce the zoning regulations. "Any person . . . may file an appeal when aggrieved by a decision or interpretation by the [administrator]. . . ." FCZR § 2.04.010. "Interpretation" implies the exercise of discretion. The regulations also specifically provide that the Board exercise discretion. In fact, the regulations state that the "granting of a[C]UP is a matter of grace, resting in the discretion of the [Board] and a refusal is not the denial of a right, conditional or otherwise." FCZR § 2.06.090. FCZR § 2.04.020(8), also allows the Board's sole discretion in granting a continuance. We cannot agree with Beasley that FCZR § 2.06.060, leaves the Board without the exercise of discretion or judgment. Smith, ¶ 28. The Board's decision to deny the transfer of the CUP to Beasley constitutes a discretionary act. A writ of mandate cannot be used to compel a discretionary act. Smith, ¶ 28.
¶ 19 Did the District Court properly determine that § 76-2-227, MCA, provided Beasley an adequate remedy?
¶ 20 Beasley argues that the Board has failed to issue a "filing of decision" or findings of fact in violation of FCZR § 2.04.020(10). Beasley contends that the Board's failure in this regard prevented him from invoking the review available under § 76-2-227, MCA. Section 76-2-227, MCA, allows judicial review of a board of adjustment's alleged illegal decision in whole, or in part, by any aggrieved person. The District Court determined that the absence of any findings of fact in support of the Board's decision did not preclude Beasley from pursuing a writ of review or certiorari under § 76-2-227, MCA.
¶ 21 Our decision in Flathead Citizens v. Flathead County Bd., 2008 MT 1, 341 Mont. 1, 175 P.3d 282, supports the District Court's determination. In Citizens, a number of important questions remained unanswered following the Board's decision to allow a gravel pit operation under a different provision of the same zoning regulations at issue here. Citizens, ¶ 48. The Board never directly answered the questions with the level of detail required by principles of administrative law and the specific requirements of the regulations themselves. Citizens, ¶ 48. The Citizen's nonetheless petitioned for review. We remanded for further proceedings to force the Board to come forward with findings of fact and conclusions to support its decision. Citizens, ¶ 49.
¶ 22 The lack of adequate findings of fact issued by the Board did not render § 76-2-227, MCA, an unavailable remedy for Beasley. The Board's lack of "filing a decision" similarly did not insulate the Board from judicial review and the requirements under § 76-2-227(2), MCA, to support its decision when directed by a district court. Citizens, ¶ 49. Beasley had a plain, speedy, and adequate remedy available thus rendering a writ of mandamus inapplicable. Section 27-26-102(2), MCA. The District Court correctly granted the Board's motion to dismiss. Doty, ¶ 9.
¶ 23 Affirmed.
We Concur: MIKE McGRATH, C.J., PATRICIA COTTER, JOHN WARNER and JAMES C. NELSON, JJ.
