Forum Discussion

Slukuleni's avatar
Slukuleni
Frequent Visitor
1 year ago
Solved

Find duplicates

I get tge beklow error on this formula in DAX

 

The syntax for ')' is incorrect. (DAX(VAR Duplicates = 'Dim GL Account FPA'[Dim GL Account FPA.FPA Account Code])).

 

Count Duplicates =
VAR Duplicates = 'Dim GL Account FPA'[Dim GL Account FPA.FPA Account Code]
RETURN

CALCULATE(
COUNTROWS('Dim GL Account FPA'),
ALL('Dim GL Account FPA'),
'Dim GL Account FPA'='Dim GL Account FPA'[Dim GL Account FPA.FPA Account Code]

  • Hi Slukuleni , Thank you for reaching out to the Microsoft Community Forum.

     

    Please refer attached .pbix file and see if it solves your issue. If not, please provide details along with sample data.

     

    If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.

6 Replies

  • Slukuleni , Try using

    DAX
    Count Duplicates =
    VAR Duplicates = 'Dim GL Account FPA'[FPA Account Code]
    RETURN
    CALCULATE(
    COUNTROWS('Dim GL Account FPA'),
    ALL('Dim GL Account FPA'),
    'Dim GL Account FPA'[FPA Account Code] = Duplicates
    )

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi Slukuleni , Thank you for reaching out to the Microsoft Community Forum.

     

    Please refer attached .pbix file and see if it solves your issue. If not, please provide details along with sample data.

     

    If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
    Thank you.

    • v-dineshya's avatar
      v-dineshya
      Community Support

      Hi @Slukuleni ,

      Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
      Thank you.

  • HI Slukuleni ,

    you can use this formula to find duplicates

     

    Count Duplicates =
    VAR Duplicates = 'Dim GL Account FPA'[FPA Account Code]
    RETURN
    CALCULATE(
    COUNTROWS('Dim GL Account FPA'),
    ALL('Dim GL Account FPA'), 'Dim GL Account FPA'[FPA Account Code] = Duplicates ) 

  • v-hashadapu's avatar
    v-hashadapu
    Community Support

    Hi Slukuleni , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
    Thank you.

  • v-dineshya's avatar
    v-dineshya
    Community Support

    Hi Slukuleni ,

    Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
    Thank you.