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
Anonymous
Not applicable

Running total with null values in the fact tables

Please help,

I have created a "Churned" measure that is supposed to count the Running total of churned customers by days:

Churned = CALCULATE(COUNTROWS(MyData), FILTER( ALL(Days),  Days[Day]<=MAX(Days[Day])),not(ISBLANK(MyData[Days To Churn]))). In my fact table - the clients that haven't churned have null in the "Days To Churn Field", so I have added the last part...
In my report I still see null value in my Days dimension.
Is there a way to eliminate the null by alternating my measure - without filtering the Visual?

Thanks!

The .pbix file

https://1drv.ms/u/s!AoP_9ampPIT7yHYIkCSTho7lE-9Q?e=eQvqi0

Capture.JPG

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can try to use the following measure to meet your reqirement:

 

Churned =
IF (
    COUNTROWS ( 'Days' ) = 0,
    BLANK (),
    CALCULATE (
        COUNTROWS ( MyData ),
        FILTER ( ALLSELECTED ( Days ), Days[Day] <= MAX ( Days[Day] ) ),
        NOT ( ISBLANK ( 'MyData'[Days To Churn] ) )
    )
)

 

5.jpg

 


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can try to use the following measure to meet your reqirement:

 

Churned =
IF (
    COUNTROWS ( 'Days' ) = 0,
    BLANK (),
    CALCULATE (
        COUNTROWS ( MyData ),
        FILTER ( ALLSELECTED ( Days ), Days[Day] <= MAX ( Days[Day] ) ),
        NOT ( ISBLANK ( 'MyData'[Days To Churn] ) )
    )
)

 

5.jpg

 


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Awesome, thanks, @v-lid-msft !

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.