Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have to replace blank with zero in metrix visual in power bi.
I am showing sales of 3 dimension region, cluster, country as drill down rows against period, month and day wise on the column.
This is the basic formula
When i write
Var MonthlySales =
The records for which it's showing zero for them there are no rows in the data tables.
How can i first check for such rows and mark them zero before the actual formulas start.
Thanks
have you tried this
Proud to be a Super User!
Thanks for the reply.
I have tried as below, but it doesn't work and showing zeros.
This is strange to see it start showing P1, P2 in the column when we add +0
in your original DAX, you set period title is 05, is that May? Your screenshot shows the result of Jan.
Proud to be a Super User!
What I want is :
1. This matrix should show latest period information as we proceed further. Like P6 started now and so on.
2. This formula works fine for me but it shows blank. This is basically that combination rows are not present in the data for that day. I want to show 0 when no values.
3. As soon as i apply condition or look to catch this scnarios. All values coming as 0 and metrix started showing values from P1 to P6.
have you tried to modify the last part of DAX
iF(not(isblank(monthlysales)),monthlysales,0)
Proud to be a Super User!
Thanks for the reply.
Yes, i tried this initially but not worked as well.
IF(NOT(ISBLANK(MonthlySales)),MonthlySales,0)
As soon as I pass zero, all becomes zero.
can you share the pbix file after removing sensitive data?
Proud to be a Super User!
Hi, Thanks for your reply.
Attached sample pbix on the below location:
https://drive.google.com/file/d/1SJPSZConmHt-soh9QoVg98VsSz7cPHxJ/view?usp=sharing
Thanks
Thanks for your reply.
We have P5 starts from May 6th to June5th so it may include May and June also, its not calendar months. Now I add +0 the matrix starts showing from P1 and period title = P5 condition fails.
I have also tried with count of rows in if condition as below,
it identified blank records and only give zero for it. But don't show actual records which has values in it. Issue the same it shows P1 to P3 though we have given P5.
the fasteset way is to add a visual filter and select P05
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |