cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
MVP

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.

Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Regular Visitor

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

Community Support

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.

MVP

Hi @whysotan,

could you provide sample data or a screenshot

Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Regular Visitor

Hello @mwegener,

Here's a picture of the visual.

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.

MVP

Hi @whysotan ,

what is your measure?

Maybe this helps:

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

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Announcements

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 Monthly Update - June 2024

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

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors