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
afleiderman1
Helper I
Helper I

Difference between two columns and blank data type question

I got a quick question I got the following data

My rows are customer name

my column are weeks

my measure is sum of sales

and another measure from previous week sales 

 

                            Week 1                                                    Week 2                                                                          Week 3       

                       Previous    Week  diff           Previous        week                      diff                   PreviousWeek      Week          diff

 

James              blank           100          100                100            50                -50                       50                    60                  10

 

 

Fernando

 

 

Dresta

 

 

 

 

 

diff=week-previous

 

Since you see on the first week I have blank for the previous because I do not know what that value is because I have not brough it into the data set. Is there anyway to make my diff columns also blank but only for the first week.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

diff=if(isblank(previous),blank(),week-previous)

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

diff=if(isblank(previous),blank(),week-previous)

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.