Forum Discussion
Return unique value list from date range slicer
I have used the method descibed in this link to do date range comparisons for sales but now I need to return a list based on the code.
https://medium.com/chandakamit/power-bi-comparing-data-across-date-ranges-36be49b68613
Here is what my measure looks like currently:
Try to create a measure and apply it to visual level filter.
measure = if(max(OPENDET [ORDER DATE]) in values('Date'[Date]),1,0)
7 Replies
- PhilipTreacy
Super User
Hi gaiusgw
The List of Unique ID's can be created with this
List Unique IDs = CALCULATE(CONCATENATEX(DISTINCT(OpenDet[CustNumber]), ('OpenDet'[CustNumber]),", "))and the count with this
Count Unique IDs = DISTINCTCOUNT(OpenDet[CustNumber])Regards
Phil
- gaiusgw
Helper III
Hey Phil,
Thanks for examples and the file! However, I may has misspoke when I said "list" of unique returns. What I meant was narrowing down a table of IDs based on the date formula I am curretly using.
The count part is what I needed for count though so that great. Thanks a lot.
- PhilipTreacy
Super User
- gaiusgw
Helper III
Hopefully this screenshot clear things up. I am trying to make it so that results in the invoice box are narrowed down by date range. However, the date range method I am using makes it so that dates cannot have a relationship between databases. So i am looking to plug into the code in my original post.
- gaiusgw
Helper III
PhilipTreacy anymore advise on this? Thanks a lot.
- V-lianl-msft
Community Support
Try to create a measure and apply it to visual level filter.
measure = if(max(OPENDET [ORDER DATE]) in values('Date'[Date]),1,0)
- gaiusgw
Helper III
Sorry i do not see how this plugs into my original formula. I have tried a few differetn ways but am only getting the max value which is the most recent date. What i need is to have the results of the table narrowed by the date slicer from the original formula because many other elements of my report are linked to those date slicers.