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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
GunnerJ
Post Patron
Post Patron

Table Visual goes blank when adding measure

I'm trying to calculate the difference between one date and the day that came before it. So for January 2nd I'd expect to see '3' (898-895=3). However when I add any combination of custom columns or measures the table goes blank.

GunnerJ_0-1644418639903.png

I've tried this measure.

Daily Usage = CALCULATE(SUM('2021 Daily Usage'[BI_RDG]), PREVIOUSDAY('2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM]))
 
And this custom Column.
TEST = CALCULATE(SUM('2021 Daily Usage'[BI_RDG]), PREVIOUSDAY('2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM]),'2021 Daily Usage'[BI_ACCT] = EARLIER('2021 Daily Usage'[BI_ACCT]))
 
The results always return to this.
GunnerJ_1-1644418940492.png

 

 

Any help in explaining what I'm overlooking would be greatly appreciated. 

 

Thanks

 

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@GunnerJ,

 

Try this calculated column:

 

Daily Usage Column = 
VAR vCurrentAmount = '2021 Daily Usage'[BI_RDG]
VAR vCurrentDate = '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM]
VAR vPreviousDate =
    CALCULATE (
        MAX ( '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] ),
        ALLEXCEPT ( '2021 Daily Usage', '2021 Daily Usage'[BI_ACCT] ),
        '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] < vCurrentDate
    )
VAR vPreviousAmount =
    CALCULATE (
        SUM ( '2021 Daily Usage'[BI_RDG] ),
        ALLEXCEPT ( '2021 Daily Usage', '2021 Daily Usage'[BI_ACCT] ),
        '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] = vPreviousDate
    )
VAR vResult = vCurrentAmount - vPreviousAmount
RETURN
    vResult

 

I created additional rows to verify the logic:

 

DataInsights_0-1644437700502.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@GunnerJ,

 

Try this calculated column:

 

Daily Usage Column = 
VAR vCurrentAmount = '2021 Daily Usage'[BI_RDG]
VAR vCurrentDate = '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM]
VAR vPreviousDate =
    CALCULATE (
        MAX ( '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] ),
        ALLEXCEPT ( '2021 Daily Usage', '2021 Daily Usage'[BI_ACCT] ),
        '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] < vCurrentDate
    )
VAR vPreviousAmount =
    CALCULATE (
        SUM ( '2021 Daily Usage'[BI_RDG] ),
        ALLEXCEPT ( '2021 Daily Usage', '2021 Daily Usage'[BI_ACCT] ),
        '2021 Daily Usage'[BI_INTERVAL_RDG_DT_TM] = vPreviousDate
    )
VAR vResult = vCurrentAmount - vPreviousAmount
RETURN
    vResult

 

I created additional rows to verify the logic:

 

DataInsights_0-1644437700502.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.