Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Boopep
Helper I
Helper I

Displaying all series number and if there is duplicate display only with specific value

Hi!

Requesting assistance in creating DAX measures because I want to display all my CLAIMSERIESNUMBER and its corresponding CLAIMS AMOUNT, but sometimes it has duplicate CLAIMSERIESNUMBER, if this happens i want to include only those CLAIMSERIESNUMBER with a value of "refiled" in RECEIVETYPE. 

 

Also i want to sum all the CLAIMS AMOUNT of all the output CLAIMSERIESNUMBER from the DAX above.

 

This is my table

Boopep_0-1756344566732.png

 

 

11 REPLIES 11
kushanNa
Super User
Super User

Hi @Boopep 

 

are you looking for an output similar to this ? 

 

kushanNa_0-1756358090048.png

 

if so I have attached the sample pbix file i have created for your reference 

 

 

 

Wow! i think you nailed it! Thank you so much! Amazing! 

Hi @Boopep,
If @kushanNa  answer has solved your issue, please Accept as solution. This will help other community members also when they face the same problem.

Regards,
Harshitha.

danextian
Super User
Super User

Hi @Boopep 

Several approaches:

  • Clean your data source by removing duplicates which can be done in Power Query.
  • If the above approach is not doable for some reason, you can create a calculated column that identifies which rows are to be included in the sum.
  • Or you can just use a measure only approach. 

Which one to follow depends on what you want to do with the other rows that are not to be included in the sum.

 

Calculated column to  identify which rows to include:

Include = 
VAR _RowCount =
    COUNTROWS (
        FILTER (
            'DAX',
            'DAX'[ClaimSeriesNumber] = EARLIER ( 'DAX'[ClaimSeriesNumber] )
        )
    )
RETURN
    IF ( _RowCount > 1 && 'DAX'[ReceiveType] = "Refiled" || _RowCount = 1, TRUE (), FALSE () )

Measure only:

Total Claim = 
VAR _RowCount =
    CALCULATE ( COUNTROWS ( 'DAX' ), ALLEXCEPT ( 'DAX', 'DAX'[ClaimSeriesNumber] ) )
RETURN
    SUMX (
        FILTER (
            SUMMARIZECOLUMNS (
                'DAX'[ClaimSeriesNumber],
                'DAX'[ReceiveType],
                'DAX'[Claim Amount],
                "@Row Count", _RowCount
            ),
            [@Row Count] = 1
                || [ReceiveType] = "Refiled"
        ),
        [Claim Amount]
    )

Please see the attached pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
MarcoSparkBI
Frequent Visitor

@Boopep ,hi ,basically it is not difficult to show what you want. you can use power query to identify how many records apprears of seriesnumber. for more than 1 times apprears , you can use select to filter only "refiled". 
recomend to provide some simple data  that i can provide more detail solutions

Regards
Marco

ClaimSeriesNumberFacilityNameReceiveTypeDateReceivedClaim AmountPayable AmountStatus
1807091001589BICOL MEDICAL CENTERREFILED06/25/202558800NULLRTH Transmittal
1807261001370BULAN MEDICARE HOSPITALREFILED07/03/20254200NULLRTH Transmittal
1812111000025RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20258000NULLRTH Transmittal
1812111000224RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20254340NULLRTH Transmittal
1812171000703RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20257000NULLRTH Transmittal
1902061000198RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20257000NULLRTH Transmittal
2502131002082BICOL MEDICAL CENTERNEW02/13/202510738NULLRTH Transmittal
2502131002082BICOL MEDICAL CENTERREFILED04/28/20251000010000Paid
2502131002083BICOL MEDICAL CENTERNEW02/13/202510738NULLRTH Transmittal
2502131002083BICOL MEDICAL CENTERREFILED04/28/20251000010000Paid
2502131002101BICOL MEDICAL CENTERNEW02/13/20259464NULLRTH Transmittal
2502131002101BICOL MEDICAL CENTERREFILED04/30/20259000NULLDenied Transmittal
2502131002102BICOL MEDICAL CENTERNEW02/13/20257280NULLRTH Transmittal
2502131002102BICOL MEDICAL CENTERREFILED04/30/202572807280Paid
Shahid12523
Memorable Member
Memorable Member

DAX Measure to Sum Filtered Claims Amount


TotalFilteredClaimsAmount =
CALCULATE(
SUM('ClaimsTable'[CLAIMS AMOUNT]),
FILTER(
ALL('ClaimsTable'),
COUNTROWS(
FILTER(
ALL('ClaimsTable'),
'ClaimsTable'[CLAIMSERIESNUMBER] = EARLIER('ClaimsTable'[CLAIMSERIESNUMBER])
)
) = 1
|| 'ClaimsTable'[RECEIVETYPE] = "refiled"
)
)

 

This measure:
- Includes all unique CLAIMSERIESNUMBER
- For duplicates, only includes those with "refiled" in RECEIVETYPE
- Sums their CLAIMS AMOUNT

 

Shahed Shaikh

Boopep_0-1756348827811.png

 

Boopep_0-1756348827811.png

 

Ashish_Mathur
Super User
Super User

Hi,

Share data in a format that can be pasted in an MS Excel file.  Show the expected result very clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

ClaimSeriesNumberFacilityNameReceiveTypeDateReceivedClaim AmountPayable AmountStatus
1807091001589BICOL MEDICAL CENTERREFILED06/25/202558800NULLRTH Transmittal
1807261001370BULAN MEDICARE HOSPITALREFILED07/03/20254200NULLRTH Transmittal
1812111000025RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20258000NULLRTH Transmittal
1812111000224RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20254340NULLRTH Transmittal
1812171000703RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20257000NULLRTH Transmittal
1902061000198RACELIS - TIONGSON MEDICAL CLINICREFILED02/19/20257000NULLRTH Transmittal
2502131002082BICOL MEDICAL CENTERNEW02/13/202510738NULLRTH Transmittal
2502131002082BICOL MEDICAL CENTERREFILED04/28/20251000010000Paid
2502131002083BICOL MEDICAL CENTERNEW02/13/202510738NULLRTH Transmittal
2502131002083BICOL MEDICAL CENTERREFILED04/28/20251000010000Paid
2502131002101BICOL MEDICAL CENTERNEW02/13/20259464NULLRTH Transmittal
2502131002101BICOL MEDICAL CENTERREFILED04/30/20259000NULLDenied Transmittal
2502131002102BICOL MEDICAL CENTERNEW02/13/20257280NULLRTH Transmittal
2502131002102BICOL MEDICAL CENTERREFILED04/30/202572807280Paid

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.