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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Chandrashekar
Resolver III
Resolver III

How to get Zero for Blank values

Hello,

 

How to get zero for blank values as am getting for first row but not for 4th.

Chandrashekar_0-1661169926478.png

Dax: 

Res/Res1 =

SUMX(
Summarize('TS','TS'[Priority],'TS'[AS]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[Date_Closed_SLA],'Calendar'[Date]),
FILTER (
VALUES('TS'), 'TS'[Parent]=Blank() && 'TS'[In Task2] =1 &&
'TS' [Response/Restore]<>Blank() ),
'TS'[Priority]=earlier('TS'[Priority]),
'TS'[Actual stage]=EARLIER('TS'[AS]
)))+0

 

 

 

1 ACCEPTED SOLUTION

This is because you are using a one-table model. Such models are inherently incorrect and should never be used unless you want to have issues you will never be able to explain (due to, for instance, the auto-exists feature).

 

Please use a correct model that's a star-schema and your worries will be gone. You definitely should read this article before you even start thinking about data modeling in PBI: Understand star schema and the importance for Power BI … (bing.com)

View solution in original post

8 REPLIES 8
v-cazheng-msft
Community Support
Community Support

Hi @Chandrashekar,

 

You may try to make some change to your formula.

Res/Res1 =
var count_=SUMX(
Summarize('TS','TS'[Priority],'TS'[AS]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[Date_Closed_SLA],'Calendar'[Date]),
FILTER (
VALUES('TS'), 'TS'[Parent]=Blank() && 'TS'[In Task2] =1 &&
'TS' [Response/Restore]<>Blank() ),
'TS'[Priority]=earlier('TS'[Priority]),
'TS'[Actual stage]=EARLIER('TS'[AS]
)))+0
return if(isblank(count_),0,count_)

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,

Community Support Team _ Caiyun

Hello, 

 

I tried this solution(with your formula) but still am getting zero. is there any other way to fix it.

 

Regards,

Chandrashekar B 

Hello,

 

Any help to get zero for blank values?

 

Regards,

Chandrashekar B

Chandrashekar
Resolver III
Resolver III

Hello,

 

May I know for why zero getting 1-Critical but not getting for 4-low. 

 

How to get zero for blank values as am getting for first row but not for 4th.

Chandrashekar_0-1661238144170.png

 

Dax: 

Res/Res1 =

SUMX(
Summarize('TS','TS'[Priority],'TS'[AS]),
CALCULATE (
COUNTROWS('TS'),USERELATIONSHIP('TS'[Date_Closed_SLA],'Calendar'[Date]),
FILTER (
VALUES('TS'), 'TS'[Parent]=Blank() && 'TS'[In Task2] =1 &&
'TS' [Response/Restore]<>Blank() ),
'TS'[Priority]=earlier('TS'[Priority]),
'TS'[Actual stage]=EARLIER('TS'[AS]
)))+0

 

Regards,

Chandrashekar B

This is because you are using a one-table model. Such models are inherently incorrect and should never be used unless you want to have issues you will never be able to explain (due to, for instance, the auto-exists feature).

 

Please use a correct model that's a star-schema and your worries will be gone. You definitely should read this article before you even start thinking about data modeling in PBI: Understand star schema and the importance for Power BI … (bing.com)

Hello,

 

Thank for the instructions. I will check on it.

 

Regards,

Chandrashekar B

amitchandak
Super User
Super User

@Chandrashekar , is Priority coming from a separate dimension table joine diwth main fact. If not try that out

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello Amit,

 

Can you please show how to do it as am bit new to this.

 

Regards,

Chandrashekar B

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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