DAX code
Total Sales (With No Data Message) =
VAR Result = [Total Sales]
RETURN
IF(ISBLANK(Result), "No data for this selection", FORMAT(Result, "$#,##0"))
Returns a friendly message when a measure would otherwise show blank, for use in a card visual.
Type your table and column names once. Every measure below updates.
Total Sales (With No Data Message) =
VAR Result = [Total Sales]
RETURN
IF(ISBLANK(Result), "No data for this selection", FORMAT(Result, "$#,##0"))
Depends on the Total Sales measure from this library; the result becomes text, so it can't be used inside further numeric calculations.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to "No Data" Message.