Forum Discussion
Not showing duplicates in visual
- 4 years ago
Hi, Anonymous
Latest_Date = var MaxDate = CALCULATE(MAXX(Users,Users[Date]), ALLEXCEPT(Users,Users[USER-ID])) return MaxDateIs this something that would fulfil your request?
Hi Greg_Deckler ,
thanks for your idea, but it doesnt seem to work the way I need it to. Lets say I have two results of testcases with same ID but on different versions. I need the measure to filter out the one thats older. I tried your approach and its just showing the date of the result in the table instead of removing it. i had the ideo to assign 1s and 0s to it and than filter after 1s for the latest but dont really know how to do this with a measure.
Anonymous Hard to be specific without sample data and expected output. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
- Anonymous4 years agoNot applicable
TC_ID Version Date IsLatestResult 1 23.3 10.10.2021 0 1 25.3 20.10.2021 1 2 23.3 10.10.2021 1 3 24.2 15.10.2021 1 Sorry that I cant show real sample data. But the idea goes like this. Where the IsLatestResult is the Measure. My PieChart should than only show the values that have 1s.
- vojtechsima4 years ago
Super User
Hi, Anonymous,
if you want to use it that way, then here is my solution in calculated column:IsLatestResultCheck = var latestdate = CALCULATE(MAXX('Table','Table'[Date]),ALLEXCEPT('Table','Table'[TC_ID])) var check = if('Table'[Date]=latestdate,1,0) return checkTho, I would prepare my earlier solution, where you would instead of "Date" display just the "New Latest Date", that way you will see only the latest.
Like this:
- Anonymous4 years agoNot applicable
I think this wont work, because I have a lot more versions and results and testcases in my dataset. And in my visual I only want to do this for selected versions nad if I would do a calculated column it would a lot of times filter out the results I want because its not the latest result in total but it would be latest on selection. Yout other solution would suite better if it wouldnt still display all results in my case.