Forum Discussion
Auto-Filter Tables Based on Date in Column
- 5 years ago
Hi Anonymous ,
You can modify the paycode at underlined section and create a new measure.
I have modified the demo, please try it:demo.pbix
Best Regards,
Link
Basically, I would like the report to auto filter to only count the leaves of absence AFTER the start date of the Corrective Action OR after the Reopen date if there is one.
The reopen date just shows the last time I extended the Corrective ACtion. I'm not sure any of my sample data actually has any, but for example if I have to extend Mosby, Ted's Corrective ACtion by 10 days, the Reopen date will show when I did that and the reopen reason would note something like "Extendind due to leave of absence - Original End: (original end date), New End (End date after extension).
This is so I know I have already looked at the leaves of absence up to that date for the individual and know not to double count the dates before this.
Hi Anonymous
Create a measure as:
Measure = var _table=SELECTCOLUMNS(CAs,"Employee ID",CAs[Employee ID],"Date started",IF(CAs[Reopened Date]=BLANK(),CAs[Date started],CAs[Reopened Date]))
return
var _table2=FILTER(GENERATE(_table,LoAs),[Employee ID]=[ID:]&&[Date]>=[Date started]&&[Pay Code]="Leave of Absence")
return
COUNTAX(_table2,[Employee ID])Here is the demo, please try it: Auto-Filter Tables Based on Date in Column
Best Regards,
Link
- Anonymous5 years agoNot applicable
What should I do with the measure? In your example, the card visual that has the measure is returning blank.
- v-xulin-mstf5 years agoCommunity Support
Hi Anonymous
The measure return the count the leaves of absence after the start date of the corrective action or after the reopen date if there is one.
The card visual that has the measure is returning blank because there have no data that meets the conditions.
Please try the demo and check if it works.
Best Regards,
Link
- Syndicate_Admin5 years agoAdministrator
Okay, I tried adding in some data that met the criteria on Mosby, Ted and Erickson, Marshall and the measure is still showing blank.