cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rcabang Frequent Visitor
Frequent Visitor

Count of members currently admitted using a dim_date table and a fac_member table

I have Member_ID, Admit_Date, and Discharge_Date from a fact table and a CalendarDate from a Dim_Date table.

 

I am using CalendarDate as the axis on a line graph and want to show the number of members who were currently admitted on each date...meaning the calendar date was between the Admit_Date and Discharge_Date.

 

This is what I did for the measure, but I don't think it is right.

 

Currently_Admitted_Measure= CALCULATE(DISTINCTCOUNT(Fac_Member[Member_ID]),FILTER(Dim_Date,Dim_Date[CalendarDate]>MAX(Fac_Member[Admit_Date])),FILTER(Dim_Date,Dim_Date[CalendarDate]<MAX(Fac_Member[Discharge_Date])))
 
Any help is much appreciated! Thanks!
2 REPLIES 2
Community Support Team
Community Support Team

Re: Count of members currently admitted using a dim_date table and a fac_member table

@rcabang ,

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/Create-date-Parameter-asat-date-to-get-active-customers/m-p...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rcabang Frequent Visitor
Frequent Visitor

Re: Count of members currently admitted using a dim_date table and a fac_member table

Hi,

 

Thanks! This gives me the counts I am looking for! Instead of COUNTROWS, is there something else I can use to also identify the associated Member_ID's as well?

 

Thanks in Advance,

 

Ronald

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors