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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jramon
Regular Visitor

Created table not showing 0 after a group by in the source table

Hello,

I,m having an issue trying to get the value 0 when creating a table.

I,m creating the table:

MONTHDIFF = CALCULATETABLE(GROUPBY(EXIT_RENEWALS_COMINGEXITS,EXIT_RENEWALS_COMINGEXITS[EXIT_RENEWAL_MONTHSDIFF]),FILTER(EXIT_RENEWALS_COMINGEXITS,EXIT_RENEWALS_COMINGEXITS[EXIT_RENEWAL_MONTHSDIFF]<>blank()))

this table takes the values from EXIT_RENEWALS_COMINGEXITS[EXIT_RENEWAL_MONTHSDIFF], that has a range of values from -30 to 30 and some blanks, its type its integer, for some reason is taking all the values besides the 0 any clue why?

If my question is not clear please tell me, and I will try to elaborate it a bit more.

thanks for your help.

1 ACCEPTED SOLUTION

Hello @v-xiaotang 
I finally decided to create a separate table with a sequence of numbers including 0, but I will try your solution and let you know if it works, it probably will, thanks for the explanation and for your time!

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @jramon 

Try this,

MONTHDIFF = CALCULATETABLE(GROUPBY(EXIT_RENEWALS_COMINGEXITS,EXIT_RENEWALS_COMINGEXITS[EXIT_RENEWAL_MONTHSDIFF]),FILTER(EXIT_RENEWALS_COMINGEXITS,NOT(ISBLANK(EXIT_RENEWALS_COMINGEXITS[EXIT_RENEWAL_MONTHSDIFF]))))

vxiaotang_1-1638755762570.png

And its reason is,

 

 

vxiaotang_0-1638756437009.png

https://docs.microsoft.com/en-us/dax/dax-operator-reference#comparison-operators

 

 

Best Regards,

Community Support Team _Tang

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

Hello @v-xiaotang 
I finally decided to create a separate table with a sequence of numbers including 0, but I will try your solution and let you know if it works, it probably will, thanks for the explanation and for your time!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.