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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ayoubb
Helper IV
Helper IV

counting number of tickets changed the groupe

Hello, 

 

First i appreciate your help, because of you i have learned such things in BI;

 

i revert back to you to help me for counting how many  distinction [N demande] were in [Statut] "En cours" and [Groupe utilisateur] "SAF_N1" and then changed the groupe to any other groupe except "SAF_N1" and "SAF_N0 "

 

 

Count.JPG

 

Thanks a lot 

1 ACCEPTED SOLUTION

because the tickets they repeated i got more than it should be, i need to add dinstinct to this formula: 

 

= countrows(EXCEPT(selectcolumns(filter('Statut des DS','Statut des DS'[Groupe Historisé]="SAF_N1"),"ticket",[N° demande de service]),selectcolumns(filter('Statut des DS','Statut des DS'[Groupe Historisé]="SAF_ESC"),"Tiket",[N° demande de service])))

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

@ayoubb Can you post sample data as text and expected output? Otherwise, I am thinking some sort of table variables with filters and maybe EXCEPT or INTERSECT?

 

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Maybe i was not clear, i want to calculte what it is highlited below, Distinction ticket in [n° demande de service] with [statut] "En cours" in groupe "SAF_N1" and changed the groupe to SAF_ESC and the other one to SAF_COM 

 

if you help me to create this DAX the result should be: 2 

 

to explain further this result, it means two tickets were in SAF_N1 and switched to SAF_ESC and SAF_COM

 

Count.JPG

amitchandak
Super User
Super User

@ayoubb , Not very clear, Try if this measure can help

CALCUALTE(count(Table[N demande] ) , filter(Table,Table[Statut] <> Table[Groupe utilisateur]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I want to count how many ticket were in SAF_N1 and changed the groupe to SAF_ESC? 

@ayoubb , try like

countrows(excpet(selectcolumns(filter(Table,Table[Statut]="SAF_N1"),"N demande",[N demande]),selectcolumns(filter(Table,Table[Groupe utilisateur]="SAF_ESC"),"N demande",[N demande])))

 

Distinct might be required if ticket no repeats

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

because the tickets they repeated i got more than it should be, i need to add dinstinct to this formula: 

 

= countrows(EXCEPT(selectcolumns(filter('Statut des DS','Statut des DS'[Groupe Historisé]="SAF_N1"),"ticket",[N° demande de service]),selectcolumns(filter('Statut des DS','Statut des DS'[Groupe Historisé]="SAF_ESC"),"Tiket",[N° demande de service])))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors