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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tyw214
Helper I
Helper I

How to not show actual blank months when you do +0 to show blank as zero?

The simple trick to return blanks as 0 is to +0 at the end of an expression, but I run into a problem that my date table starts 1/1/2020 but, my data actually starts in July.

 

So when i do a calculate(sum(col_1)) + 0 it shows Jan through Jun as well and not start in July.

 

I tried do a visual filter on it but it still doesnt work. anybody have a solution for this?

3 REPLIES 3
TomMartens
Super User
Super User

Hey @tyw214 ,

 

you can do the following.

 

  1. determine the min date in your facttable using this DAX statement: CALCULATE( MIN( 'facttable'[date] ) , ALL( 'calendartable' ) )
  2. check if the current date is greater than or equal to the min date from the previous step, if yes add +0 otherwise don't

Hopefully this provides what you are looking for.

 

Regards,

Tom



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

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

this seems to only work if there is an actual placeholder month on the 'facttable' to begin with. so it works when you have actual placeholder dates in like july, aug, sept, with no data. But it doesn't work if the sept/oct doesn't exist in the facttable to begin with it seems.

 

hmm i wonder if there is another solution.

Hi @tyw214 ,

It may need you to provide the applied fields/measure on visual and the related formula of measure in order to find the cause of problem faster. It is better if you can provide the related screenshot(include sample data, applied fields on visual etc.). Thank you.

Best Regards

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.