Forum Discussion
How create additional table based on specific status
- 11 months ago
Hi Boopep,
I have reproduced your scenario in Power BI Desktop. You can achieve this by creating a new table that filters based on duplicates and status.
Here’s one way using DAX:
NewTable = VAR WithCounts = ADDCOLUMNS ( Claims, "CountPerSeries", CALCULATE ( COUNTROWS ( Claims ), ALLEXCEPT ( Claims, Claims[ClaimSeriesNumber] ) ) ) RETURN FILTER ( WithCounts, [CountPerSeries] = 1 || ( [CountPerSeries] > 1 && Claims[Status] = "Refiled" ) )This logic will:
- Keep all unique ClaimSeriesNumber rows.
- For duplicates, only include those where the Status = "Refiled".
I tested this with sample data and got the expected result:
For your reference, I am attaching .pbix file and thank you, Ilgar_Zarbali , MohamedFowzan1 & Shahid12523 for sharing your valuable insights.
Best regards,
Ganesh Singamshetty.
Hi Boopep,
I have reproduced your scenario in Power BI Desktop. You can achieve this by creating a new table that filters based on duplicates and status.
Here’s one way using DAX:
NewTable =
VAR WithCounts =
ADDCOLUMNS (
Claims,
"CountPerSeries",
CALCULATE ( COUNTROWS ( Claims ), ALLEXCEPT ( Claims, Claims[ClaimSeriesNumber] ) )
)
RETURN
FILTER (
WithCounts,
[CountPerSeries] = 1 || ( [CountPerSeries] > 1 && Claims[Status] = "Refiled" )
)
This logic will:
- Keep all unique ClaimSeriesNumber rows.
- For duplicates, only include those where the Status = "Refiled".
I tested this with sample data and got the expected result:
For your reference, I am attaching .pbix file and thank you, Ilgar_Zarbali , MohamedFowzan1 & Shahid12523 for sharing your valuable insights.
Best regards,
Ganesh Singamshetty.