cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
whysotan
Regular Visitor

Force Zero for dates using measure

Hello,
I have a data sheet that has a list of dates and I need to count how many times those dates show up. Problem is there are some dates that do not show up at all and result in a blank. I need them to show 0 on my visual and I believe the method is to force them to be 0 instead of blank. Is there a measure to force zero for dates?

6 REPLIES 6

Hi @whysotan ,

 

did you solve your problem?


If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


@mwegener sorry was out of the office. I will try those methods later this week and get back to you guys.

v-yuta-msft
Community Support
Community Support

@whysotan ,

 

Try creating a calculate table using dax below:

Column = Table[Data] + 0

 

Community Support Team _ Jimmy Tao

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

Hi @whysotan,

 

could you provide sample data or a screenshot 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Hello @mwegener,

Here's a picture of the visual.

 

2019-11-19 21_44_43-Enterprise IP and Security - Deployment Organization - LDOS-weekly.png

 

As you can see there's some months not showing anything at all and I'd like to have them display 0 instead, main reason is relative date filtering doesn't appear like it works properly if there's any null or blank dates.

Hi @whysotan ,

 

what is your measure?

 

Maybe this helps:

 

CountRows =
VAR _CountRows = COUNTROWS('Table')
RETURN
IF(ISBLANK(_CountRows);0;_CountRows)
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors