Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a dataset with members and the date of their last purchase. I'm trying to identify those members who do NOT have a purchase date in the period selected with the slicer.
For example:
Member XYZ's last purchase date is 12/20/2020.
This member would be excluded from my output with a slicer selection of 1/1/2020 thru 12/31/2020 because their last purchase was made in that window. However, they WILL be in my resultset if the slicer selection is 1/1/2020 thru 11/30/2020 because they did NOT make a purchase during those dates.
FYI I'm nearly bald from tearing my hair out over this. Any help is greatly appreciated!
P.S. I have control over the underlying dataset. If I should gather the information differently, I can.
Solved! Go to Solution.
Hi @dianrob1464,
You can create an unconnected date table as the source of the slicer, then you can write a measure as a filter to use on the 'visual level filter' to filter your visual records:
Not In Range=
VAR selectedRange =
ALLSELECTED ( Selector[Date] )
VAR currPurchase =
MAX ( Table[PurchaseDate] )
RETURN
IF ( currPurchase IN selectedRange, "N", "Y" )
Applying a measure filter in Power BI - SQLBI
Regards,
Xiaoxin Sheng
Hi @dianrob1464,
You can create an unconnected date table as the source of the slicer, then you can write a measure as a filter to use on the 'visual level filter' to filter your visual records:
Not In Range=
VAR selectedRange =
ALLSELECTED ( Selector[Date] )
VAR currPurchase =
MAX ( Table[PurchaseDate] )
RETURN
IF ( currPurchase IN selectedRange, "N", "Y" )
Applying a measure filter in Power BI - SQLBI
Regards,
Xiaoxin Sheng
Hey, I'm still somewhat new to PowerBI, but hopefully this is something that may help.
I used some simple project management mockup data I had to help provide a screenshot to a solution. In my mockup, I have 3 workers that charged time to a couple of projects. However on 01/06/2022 I have two workers that did not submit time, but I would want to include that in my table so managers could see who did NOT submit time yet.
Clicking on the table, I then right-clicked on the "worker" item in the values and selected the option at the bottom to "Show items with no data". Now my table shows the other 2 workers with no time charged to projects.
I hope that helps.
Thank you, I appreciate your response; however, I failed to mention that I only want the ones NOT found in the slicer date range. I do not want those that are in the date range, kind of an exception report I suppose. I'm going to investigate your suggestion a bit more to see if I can leverage it for a solution.
Hi,
I'd like to help. Please share the link from where i can download your PBI file.
Oh I'm sorry, my mistake. What you wrote made sense, I just didn't read it correctly. I will take a look too to see what I can find. I'm still somewhat new and this could be useful for me too.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |