MTD Value is showing Blank in Card

Hi,
If i use the below measure in a table with Year or Month or Week, i can see the values, but if i use this in Card it’s shows blank.
Could you please highlight what am i missing ?

MTD Hours =
ShowValueForDates =
VAR LastDateWithData=
CALCULATE(
MAX(data[Period Ending Date]),
REMOVEFILTERS()
)
VAR FirstDateVisible=
MIN(Dates[Calendar Dates])
VAR Result=
FirstDateVisible<=LastDateWithData
Return
Result

IF(
[ShowValueForDates],
VAR LastDayAvailable=MAX(Dates[Day of Fiscal Month Number])
VAR LastFiscalYearMonthAvailable=MAX(Dates[FY Year Month Number])
VAR Hours=
CALCULATE(
[Charged Hours],
ALLEXCEPT(Dates,Dates[Day of week]),
Dates[Day of Fiscal Month Number]<=LastDayAvailable,
Dates[FY Year Month Number]=LastFiscalYearMonthAvailable)
Return
Hours
Screenshot

@nbaraili ,

Unlike tables or matrixes, card visuals have no implicit context. You need to build that up using virtual tables. This video demonstrates exactly how to do that.

– Brian

1 Like

Hello Brian,
Thank you for your reply.
I will let you know whether I am able to find a solution.

Regards,
Niraj

@nbaraili ,

Great – give it a go, and if you still have questions or problems just let me know.

  • Brian

Hi @nbaraili, we’ve noticed that no response has been received from you since September 15.

We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @nbaraili, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please create a new thread.