Forum Discussion
Exclude multiple values from calculated column
- 4 years ago
Hi hejszyszky ,
Since I do not have your specific data, I have created a template data based on what you have provided so far:
Then use the below dax to create a new column:
final = VAR index11 = RANKX ( FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ), 'Summarized Raport'[Zmiana(A,B,C,D)], , ASC ) RETURN IF ( index11 = 1, SUMX ( FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ), 'Summarized Raport'[value] ), 0 )Final output:
You can adapt my code to your specific environment and needs.
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
hejszyszky ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.
Hey amitchandak ,
Thanks for quick response.
Output of measure above is ;
| Date | Name | Niezaraportowany czasC |
| 1/3/2021 | LSN01 | 330 |
| 1/3/2021 | LSN01 | 330 |
| 1/3/2021 | LSN01 | 330 |
| 1/4/2021 | LSN01 | 508 |
| 1/4/2021 | LSN01 | 508 |
| 1/4/2021 | LSN01 | 508 |
My desired output would be:
| Date | Name | Niezaraportowany czasC |
| 1/3/2021 | LSN01 | 330 |
| 1/3/2021 | LSN01 | 0 |
| 1/3/2021 | LSN01 | 0 |
| 1/4/2021 | LSN01 | 508 |
| 1/4/2021 | LSN01 | 0 |
| 1/4/2021 | LSN01 | 0 |
Zeroes in desired output are because there is a repetition in one date and name
In conclusion, if in any same date and same name there is more than one row, include only one value.
Am i clear here 🙂 ?