Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Previous day value - SSAS Tabular live connection

Hi,

 

I need to get previous day value and show it in column and then calculate difference between the values.

Below is my data set, which is an aggregated/summarized values from base table. I have many other dimension attributes on same table.

 

So main requirement is to pull previous day outstanding. First three fields are raw, last two are calcualted in below grid.

Power BI report connected to SSAS Tabular live connection.  I am restricted to use only measures and not calculated columns.

 

Formula's currently used :

Previous O/S =
CALCULATE(sum(Data[USDOutstanding]),ALLSELECTED(Data),PREVIOUSDAY(Data[Business_Date]))

PreviousDay_Blank = IF(ISBLANK(PREVIOUSDAY(Data[Business_Date])),1,0)

 

But since holiday/weekend days dates are not avilable on my data, previous day function is not working when it encounters missing date.

I have referred to this blog - https://community.powerbi.com/t5/Desktop/Previous-day-value/m-p/610754#M291094

but when i use EARLIER and use Business_DATE in it, it says Parameter is not correct type (cant find name Business_DATE). So not really sure what i should be using.

 

Any help will be really appreciated.

 

Business_DateCommitmentOutstandingPrevious O/SPreviousDay_Blank
5/18/2020100009567 1
5/19/202010000900095670
5/20/202010000950090000
5/21/202010000960095000
5/22/202010000975096000
5/26/2020100008500 0
5/27/202010000875085000
5/28/2020105001000087500
5/29/2020105009800100000
6/1/20201050010150 1
6/2/20201050010150101500
6/3/20201050010150101500
6/4/20201050010220101500
6/5/2020105008670102200
6/8/2020110009000 1
6/9/202011000950090000
6/10/202011000965095000
6/11/202011000965096500
6/12/202011000965096500
6/15/2020110009650 1

 

Thanks

Manoj

3 Replies