The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Am a novice in PowerBI and requesting assistance.
I have the data below extracted from a large dataset;
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 |
Also I have the slicer below from computed dates;
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.
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)
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.
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 |
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
32 |
User | Count |
---|---|
96 | |
75 | |
67 | |
52 | |
52 |