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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Rngomoa
Frequent Visitor

selecting data less than defined dynamic date

Am a novice in PowerBI and requesting assistance.

I have the data below extracted  from a large dataset;

ClientIDDate_of_VisitDate_Next_Visit
2142912/7/2022 09:5126/7/2022 00:00
2142926/7/2022 12:3520/9/2022 00:00
2143029/6/2022 10:4525/7/2022 00:00
2143029/7/2022 10:412/9/2022 00:00
2143129/6/2022 12:4426/9/2022 00:00
2143229/6/2022 15:4914/7/2022 00:00
2143218/7/2022 11:4516/9/2022 00:00
2143329/6/2022 08:4218/7/2022 00:00
2143326/7/2022 15:2523/9/2022 00:00
214912/8/2022 12:4215/8/2022 00:00

 

Also I have the slicer below from computed dates;

Rngomoa_1-1664385145518.png

 

I need to do the following;

 1. Select 'Date_of_Visit' less than the 'Last date of the selected month' in the powerBI slicer.

 2. Label all 'Date_Next_Visit' greater than the 'Last date of the selected month' in the powerBI slicer minus 28 days as 'Active' client while those less as "Lost to Follow Up'.

 3. Plot a graph of the active and lost to follow up for any selected months in the slicer.

 

Any assistance will be much appreciated.

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @Rngomoa 

Thanks for reaching out to us.

Please try this,

Measure 1 = //Select 'Date_of_Visit' less than the 'Last date of the selected month' in the powerBI slicer. 
var _date= MAXX(ALLSELECTED('calendar'),[Date])
return IF(MIN('Table'[Date_of_Visit])<_date,1)

vxiaotang_0-1664445534979.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

If possible, kindly attach for me the .pbix file.

 

Thanks

Thanks for your help. Much appreciated. Am however unable to compute the measure partly because I couldn't figure out what expression you referred to as [date]) while computing for var_date. Forgive me for my ignorance. Also, somewhere you indicated _date. I couldn't understand.

 

Rngomoa
Frequent Visitor

ClientID Date_of_Visit Date_Next_Visit
21429 12/7/2022 09:51 26/7/2022 00:00
21429 26/7/2022 12:35 20/9/2022 00:00
21430 29/6/2022 10:45 25/7/2022 00:00
21430 29/7/2022 10:41 2/9/2022 00:00
21431 29/6/2022 12:44 26/9/2022 00:00
21432 29/6/2022 15:49 14/7/2022 00:00
21432 18/7/2022 11:45 16/9/2022 00:00
21433 29/6/2022 08:42 18/7/2022 00:00
21433 26/7/2022 15:25 23/9/2022 00:00
21491 2/8/2022 12:42 15/8/2022 00:00
21491 31/8/2022 10:01 29/9/2022 00:00

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.