I am working on powerbi, using data over 2 months period, writing DAX queries and trying to build reports.
I am trying to show the monthly values in card visuals.
And I am able to do it using the measure below.
PlanPrevMon = CALCULATE([PlanSum],PREVIOUSMONTH('Month Year'[Date]))
CustomKPI = IF(ISBLANK([PlanSum]),"No Data Available ",[PlanSum])&" "&IF([PlanSum]=[PlanPrevMon],"",IF([PlanSum] > [PlanPrevMon],UNICHAR(8679),UNICHAR(8681))&IF([PlanSum]<=0,"",""))
But here I don't want the user to choose the month values from slicer. I would like to show the card values as if current month value is not available then it should compare with the previous month value automatically as shown in an image below
For example, Apr-2017 value is not available; in this scenario, I would like it to compare with the Mar-2017 value. If Mar-2017 value also not available, then the previous month value and so on