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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.