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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ayoubb
Helper IV
Helper IV

double request number

i have a data base that contains a lot of ticket numbers with different status, i want to calculate these tickets numbers without counting the double tickets , here is below a screen capture to understand more.

 

normaly the result should be only : 2 tickets

 

A double ticket.JPG

 

Thanks for your help

1 ACCEPTED SOLUTION

Hi @ayoubb ,

 

Try this measure:

Measure = CALCULATE(DISTINCTCOUNT('Table'[N° demande de service]),ALLSELECTED('Table'))

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @ayoubb ,

 

Please try what @az38  said or this:

distinctcount_id = 
SUMX (
    ADDCOLUMNS (
        DISTINCT ('Table'[demande] ),
        "distinctcount", CALCULATE ( DISTINCTCOUNT ('Table'[demande]) )
    ),
    [distinctcount]
)

If this is not what you need,please show an example what the expected result would be. 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply, however i tried the DAX that you provided me but shows me wrong data, 

 

you see the table below, in the column "N° demande de service" i have tickets numbers which they're dublicated, i want a formula that count dublicated ticket for one time.

 

for example this column N° demande de service, if i calculate the ticket number the result should be: 3

 

table.JPG

Hi @ayoubb ,

 

Is this problem sloved?
If not, please let me know.

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @ayoubb ,

 

Try this measure:

Measure = CALCULATE(DISTINCTCOUNT('Table'[N° demande de service]),ALLSELECTED('Table'))

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

az38
Community Champion
Community Champion

Hi @ayoubb 

you need smth like

Measure = DISTINCTCOUNT(Table[N demande])

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.