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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mohittimpus
Helper V
Helper V

Measure showing blank value instead of 0

Hello All,

 

I have Employee file Inside this I have a Measure "LeaseExpiry", when I  added this measure in table visualization with "Floorplan" name. LeaseExiry Measure is showing blank value instead of 0. 

Screenshot_13.jpg

 

Below I am sharing .pbix file link:

 

https://drive.google.com/file/d/1kgzK1AWX6P4RwbChHsu5KI7caqdtUsGa/view?usp=sharing

 

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @mohittimpus ,

I just updated your sample pbix file with new created page "Page 1", please check whether that is what you want. The main steps as follow:

1. Create a calculated table

Floor Plan = VALUES('employee'[FloorPlanName])

2. Create two measures or you can update the formula of measure [LeaseExpiry#1] as below:

Note: The part with red font is the one which is different with yours

00_Measure = var temp = SELECTEDVALUE('Week Table'[Week End date])
var yearmonth = INT(YEAR(temp)&""&IF(MONTH(temp)<10,"0"&MONTH(temp),MONTH(temp)))
var order1 = CALCULATE(VALUES('Lease Exp Table'[Year Month Rank]),FILTER('Lease Exp Table','Lease Exp Table'[Year_Month]=yearmonth))
var _a=
CALCULATE(
calculate(
count('employee'[LeaseId]) ,
('employee'[LeaseStatus] = "Current" ||
'employee'[LeaseStatus] = "Future" ||
'employee'[LeaseStatus] = "Notice"),FILTER(ALL('employee'[Year Month Rank],'employee'[FloorPlanName]),'employee'[FloorPlanName]=MAX('Floor Plan'[FloorPlanName])&&'employee'[Year Month Rank]-1<=order1+11&&employee[Year Month Rank]-1>=order1)),CROSSFILTER('Week Table'[Date],'employee'[CreatedOn],None))
return _a+0
01_Measure = SUMX(VALUES('Floor Plan'[FloorPlanName]),[00_Measure])

Measure showing blank value instead of 0.JPG

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

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

View solution in original post

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @mohittimpus ,

I just updated your sample pbix file with new created page "Page 1", please check whether that is what you want. The main steps as follow:

1. Create a calculated table

Floor Plan = VALUES('employee'[FloorPlanName])

2. Create two measures or you can update the formula of measure [LeaseExpiry#1] as below:

Note: The part with red font is the one which is different with yours

00_Measure = var temp = SELECTEDVALUE('Week Table'[Week End date])
var yearmonth = INT(YEAR(temp)&""&IF(MONTH(temp)<10,"0"&MONTH(temp),MONTH(temp)))
var order1 = CALCULATE(VALUES('Lease Exp Table'[Year Month Rank]),FILTER('Lease Exp Table','Lease Exp Table'[Year_Month]=yearmonth))
var _a=
CALCULATE(
calculate(
count('employee'[LeaseId]) ,
('employee'[LeaseStatus] = "Current" ||
'employee'[LeaseStatus] = "Future" ||
'employee'[LeaseStatus] = "Notice"),FILTER(ALL('employee'[Year Month Rank],'employee'[FloorPlanName]),'employee'[FloorPlanName]=MAX('Floor Plan'[FloorPlanName])&&'employee'[Year Month Rank]-1<=order1+11&&employee[Year Month Rank]-1>=order1)),CROSSFILTER('Week Table'[Date],'employee'[CreatedOn],None))
return _a+0
01_Measure = SUMX(VALUES('Floor Plan'[FloorPlanName]),[00_Measure])

Measure showing blank value instead of 0.JPG

Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

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

Hello @v-yiruan-msft ,

Thanks I got Zero(0) in the place of blank but I am showing only next 12 month data from selected week filter at

the top. but now it is giving me all year and month data which available in Database. so It should not happen like

this. It should show only 12 month data as i am showing and I want Zero(0) in place of blank.


Below i am sharing my original .pbix file below: 

https://drive.google.com/file/d/1kgzK1AWX6P4RwbChHsu5KI7caqdtUsGa/view?usp=sharing





 

sirlanceohlott
Advocate III
Advocate III

I second both of the options provided by @edhans  & @Pragati11 as solutions for your current issue.

edhans
Super User
Super User

Wrap your measure in COALESCE @mohittimpus , so COALESCE(YourMeasureCode, 0)



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Pragati11
Super User
Super User

Hi @mohittimpus ,

 

Add 0 to your "LeaseExpiry" measure calculation in the end.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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