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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
poweruser55
Helper IV
Helper IV

Put a dash in matrix value when it is blank

I have a power BI formula where I show the raw number and the percentage under it. The problem is when there is no data I want a "-" but it is putting a "%" because I have to add the symbol since it doesn't automactially show. Is there a way I can make it a - to ovveride the % when the value is blank. Not the percentage sybmol in the screenshot where that product is blank, the requirement would be a -.Screenshot 2023-02-24 161927.jpg

Jan FY22 =
VAR curMonth =LOOKUPVALUE('Month Parameter'[CurrentCycle],'Month Parameter'[ID],25) VAR curScenario =LOOKUPVALUE('Current Cycle Parameter'[CurrentCycle],'Current Cycle Parameter'[ID],1) VAR priorMonth =LOOKUPVALUE('Month Parameter'[CurrentCycle],'Month Parameter'[ID],13)
Return

 IF(CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=curMonth) &" " &   ROUND(DIVIDE(CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=curMonth) - CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=priorMonth),CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=priorMonth)),2)*100   = Blank(),"-",CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=curMonth) &" " &   ROUND(DIVIDE(CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=curMonth) - CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=priorMonth),CALCULATE(SUM(DemandRawData[ORDERS_SHIPPED]), DemandRawData[SCENARIO]=curScenario,DemandRawData[MONTH]=priorMonth)),2)*100 & "%")
2 REPLIES 2
Ahmedx
Super User
Super User

try like this:

 

COALESCE(
          SUM('Table'[sales]),
"-")

 

 

The symbol is still there @Ahmedx 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.