Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I was trying to compare week over week developments

by using the measures

LastReport:=LASTDATE(Report Date) 

PriorWeek:=DATEADD(LastReport;-7;DAYS) 

CALCULATE(SUM(Total AR);Reportdate=PriorWeek) 

I am facing an error how can I resolve it? 

1 Answer

0 votes
by (22.5k points)

Use the following formula:

Amount Variance =
VAR _PrevBlank =
    ISBLANK ( [PrevWeek Amount] )
VAR _Amount = [Amount]
VAR _PrevAmount = [PrevWeek Amount]
VAR _Variance =
    IF ( _PrevBlank, 0, _Amount - _PrevAmount )
RETURN
    _Variance

Interested to Learn Power Bi in detail? Come and Join the Power BI course by Intellipaat.

Check the following youtube link: 

 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Mar 3, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Jan 5, 2021 in BI by Chris (11.1k points)

Browse Categories

...