Forum Discussion
NehaSha
Helper II
7 years agoHow to return values based on if dates are within Slicer date range
Hi All, I am new to Power BI& and need help to resolve the below mentioned scenario Report Need to show Date Range Slicer& Card 1: value for SUM(Net Rent) based on Date Range Card 2:value for GP b...
- 7 years ago
Hello,
You can try this:
GPIEndDate = VAR LastSelectedDate = LASTDATE(ALLSELECTED(Table3[Date])) RETURN CALCULATE(SUM(Table3[GPI]), FILTER(Table3, Table3[Date] = LastSelectedDate))
GPILYEndDate =
VAR LastSelectedDate = LASTDATE(ALLSELECTED(Table3[Date]))
RETURN CALCULATE(SUM(Table3[GPILY]), FILTER(Table3, Table3[Date] = LastSelectedDate))Regards,
ElenaN
ElenaN
Resolver V
7 years agoHello,
You can try this:
GPIEndDate = VAR LastSelectedDate = LASTDATE(ALLSELECTED(Table3[Date])) RETURN CALCULATE(SUM(Table3[GPI]), FILTER(Table3, Table3[Date] = LastSelectedDate))
GPILYEndDate =
VAR LastSelectedDate = LASTDATE(ALLSELECTED(Table3[Date]))
RETURN CALCULATE(SUM(Table3[GPILY]), FILTER(Table3, Table3[Date] = LastSelectedDate))
Regards,
ElenaN
NehaSha
Helper II
7 years agoWorking fine and got the expected results! Thank you very much!