Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
orinoko0
Frequent Visitor

Dynamic Status Measure based on End date in table

Hi dear community members,
I have a table as below,  and I need to crate measure which will genrate Status for every line of table based on Date Selected on dates slicers (comes from calendar table) and the End Date from lines of table given.

 

Employee IDType of packageEmloyee RelativePhone numberStart dateEnd date
1EMPLID000013StandartRelative 1 1-Jul-24 
2EMPLID000018StandartRelative 2 1-Apr-23 
3EMPLID000018StandartRelative 3 1-Jun-23 
4EMPLID000020PlusRelative 4 1-Apr-241-Aug-24
5EMPLID000025PlusRelative 5 1-Aug-23 
6EMPLID000032PlusRelative 6 1-May-23 
7EMPLID000035PlusRelative 7 22-Aug-22 
8EMPLID000054PlusRelative 8 1-Jul-24 
9EMPLID000072StandartRelative 9 1-Jul-24 
10EMPLID000075StandartRelative 10 7-Jan-24 
11EMPLID000092PlusRelative 11 1-Oct-23 
12EMPLID000098PlusRelative 12 1-Nov-22 
13EMPLID000158PremiumRelative 13 1-Aug-231-Aug-24
14EMPLID000194PlusRelative 14 5-Dec-231-Jun-24
15EMPLID000202PlusRelative 15 13-Jun-241-Aug-24
16EMPLID000215PlusRelative 16 1-Mar-23 
17EMPLID000272StandartRelative 17 1-Mar-24 
18EMPLID000282StandartRelative 18 1-Jun-241-Aug-24

 

then the staus is "Open",
If Date Selected on slices >= that End date ,
then th status is "Closed"

I am going to use this measure for the card with drill-through, I have used the following calculation for the card to calculate dynamic number of active users

 

 

Fam Members Active = 
CALCULATE(DISTINCTCOUNT('Data'[Emloyee Relative]),
'Data'[End date]>max('My Calendar'[Date]) 
|| 
'Data'[End date]=blank())

 


and now want to add drill-through functionality to show members with active status only for the selected time period

orinoko0_1-1730035819173.png

 

as you see visual on first screenshot shows 13 elments, and drill-through page has all 18 elements

 

orinoko0_2-1730035844748.png

 

(Link to the PBI file )


Thank you in advance!

 

 

1 ACCEPTED SOLUTION
orinoko0
Frequent Visitor

Seems to me that solution was very simple, I have just added the measure to drill-through table and in filters area made it equal to 1, it works now, not sure what I did differently earlier.
So it works!
Anyway thank you all for reading! 😊😊😊

View solution in original post

3 REPLIES 3
orinoko0
Frequent Visitor

Seems to me that solution was very simple, I have just added the measure to drill-through table and in filters area made it equal to 1, it works now, not sure what I did differently earlier.
So it works!
Anyway thank you all for reading! 😊😊😊

lbendlin
Super User
Super User

Employee 18 is listed twice?

 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information. Do not include anything that is unrelated to the issue or question.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Post updated, thanks for the tips!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.