cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

If blank then zero works only in first grouping of matrix

roopesh_0-1596564716059.png

 

I added this code to the measure.

Date Range 1= 
 var xy = CALCULATE(COUNTROWS('vw_ListNew')+0, 'vw_ListNew'[StatusDate] in VALUES(DateRange1[Date]))
 return if(isblank(xy),0,xy)

it works for Date Range 1 and date Range 2, but when i add phase it still shows blank. Th

11 REPLIES 11
Fowmy
Super User
Super User

@Anonymous 

Try this way;

Date Range 1=

CALCULATE(
COUNTROWS('vw_ListNew'),
'vw_ListNew'[StatusDate] in VALUES(DateRange1[Date]) + 0

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

I tried that and it is not working

@Anonymous 

 

If you could share your PBIX file or a sample of it by saving it to a file sharing option like one drive or google drive, I can check it for you. 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy i have shared the pbix link

Link 

Anonymous
Not applicable

@

lbendlin

 

any suggestions on how to solve the problem?

@Anonymous 

There is no data when you filter by Phase 1 except for Interventional Type Interventional TX. That's why you see blanks.

Fowmy_0-1596628988916.png


You can also use only one CALCULATE and adjust both the time ranges measures like:

 
TimeFrameDateRange1 =

CALCULATE(
COUNTROWS('vw_patientListNew'),
'vw_patientListNew'[StatusDate] in VALUES(DateRange1[Date])
)

 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

How do i show not blank when data is missing?

@Anonymous 

@Anonymous 

As per my understanding, since there is no data for that combination, DAX will not evaluate anything on that cell. You can only have blanks.

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Is there a work around?

I was looking at some other posts that they used calendar table to join the main table with all the dates and display the no blank values. 

Another port said we can use "Show items with no data" would solve.

I tried using both and non of them work.

@Anonymous 

Yes, You can create a table and append. but is that really necessary? 

________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Yes my users are picky about it they don't want to see blanks. I am trying to work around

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors