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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sebas2404
Frequent Visitor

Replacing (Blanks) with 0

Dear All,

 

For a production report I'm presenting production numbers based on hours.

In some situations the machine did not produce any parts so there is no value for that hour.

 

Is there a funtion to or solution to fix this?

 

matrix in reportmatrix in reportrelationshipsrelationships

1 ACCEPTED SOLUTION

The solution didn't work.
I did solve it by creating a new measure:

 

HourlyCount = var HourlyCounter = CALCULATE(SUM(CounterTable[Value]))
return IF(ISBLANK(HourlyCounter), 0, HourlyCounter)

View solution in original post

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@Sebas2404 ,

 

Click-> Query Editor-> Replace Values and input replace null with 0 like below:

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The solution didn't work.
I did solve it by creating a new measure:

 

HourlyCount = var HourlyCounter = CALCULATE(SUM(CounterTable[Value]))
return IF(ISBLANK(HourlyCounter), 0, HourlyCounter)

,

 

This will be valid if the table where the value would null.

The problem is I link two seprate tables to fill the matrix.

If the table of shift time is static and only holds 24hours and some tekst to make the report more clear.

24hours table24hours table

I dont get the date from the machine in the database for each hour. The database simple has no line for the production counter if it has not produced any

 

table with machine numbertable with machine numberresults in matrixresults in matrix

Anonymous
Not applicable

Hello @Sebas2404,

you can create new column in DAX with simple formula:

"New Shift Time = IF(Shift[Column] = "", "0", Shift[Column])"

That should do Smiley Wink

It turned out like:

HourlyCount = var HourlyCounter = CALCULATE(SUM(CounterTable[Value]))
return IF(ISBLANK(HourlyCounter), 0, HourlyCounter)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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