Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

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

 

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

 

 

(Link to the PBI file )


Thank you in advance!

 

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    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! ðŸ˜ŠðŸ˜ŠðŸ˜Š

3 Replies