Forum Discussion

latheesh89's avatar
latheesh89
Icon for Helper II rankHelper II
8 years ago
Solved

How to use Filter selection in a DAX calculation

Dear Techies,   Let's say I'm working in a healthcare domain, where I have Patient table, which tracks the daily activites of the patient during his stay. I want to calculate the no of days he has ...
  • latheesh89's avatar
    latheesh89
    8 years ago

    Thanks nickchobotar & ccakjcrx

     

    I would like to appreciate both your effort to help me. I indeed learnt lot from you guys.

     

    I was finally able to figure out the calculation,

     

    CALCULATE(COUNT(PatientID), FILTER(ALL('DimDate'), [Date] <= MAX('DimDate'[Date])))

     

    The above calculation resolved both my cases :) 

     

    Thanks again for your help and lots of suggestions.