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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NavaneethaRaju
Helper IV
Helper IV

Measure has return the 0 where total is there

Hi ,

 

I created a measure for finding cancelled case count.

1. Cancelled =
        CALCULATE (
    COUNT ( 'Case Detail Fact'[Case Status]),
        'Case Detail Fact'[Case Status] = "Cancelled")
 
2. Total = COUNT ( 'Case Detail Fact'[Case Status] )
3. Cancel % = [Cancelled]/[Total]
 
If the cancelled is not done by sales rep, its showing blank there.  instead of blank i have to show 0 and the cancel % should be 0%. I Created a dax IF( ISBLANK([Cancelled],0,[Cancelled]), but it returns 0 in all the places , even the sales rep not done the case on that month.
 
NavaneethaRaju_0-1667456324872.png

 

Only those places alone, i have to show the 0, But while using the isblank its showing all the places. even the total was not there.

 

Kindly advice.

 
1 ACCEPTED SOLUTION

Hi,

 

there is also another option

 

you let formula 1 and 2 like it is. formula three you do the following

 

3. Cancel % = DIVIDE([Cancelled],[Total],0)

 

in this version you will have BLANK in the first formula when there is no canceled case but you will get 0% as result for formula 3.

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

2 REPLIES 2
Mikelytics
Resident Rockstar
Resident Rockstar

Hi,

 

Please put '+0" behind the forst formula and an if statement to have only values where really is something

 

Cancelled =

IF(
   [Total] <> 0,
     CALCULATE (
        COUNT ( 'Case Detail Fact'[Case Status]),
        'Case Detail Fact'[Case Status] = "Cancelled")
    ) + 0
   ,BLANK()
)

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hi,

 

there is also another option

 

you let formula 1 and 2 like it is. formula three you do the following

 

3. Cancel % = DIVIDE([Cancelled],[Total],0)

 

in this version you will have BLANK in the first formula when there is no canceled case but you will get 0% as result for formula 3.

 

Best regards

Michael

-----------------------------------------------------

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

@ me in replies or I'll lose your thread.

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors