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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ayoubb
Helper IV
Helper IV

Hwo to calculate transfered tickets from a group to another

Hello, 

 

Thank you for your help and support;

 

Please this is my database below, and i want to create 2 measures to calculate: 

 

- how many tickets number were in groupe of support N0 and then transfered to N1   <<>> the result should be : 2

- how many ticket number were in groupe N0 and then transfered directly to N3 <>> the result should be : 1

data base.JPG

Thank you for your reply and answered 

 

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @ayoubb,

 

Try measure as:

Measure =

var _table=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="opened"&&'Table'[groupe of support]="N0"))

var _table1=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="pending"&&'Table'[groupe of support]="N1"))

Return

IF(MAX('Table'[Request number]) in _table && MAX('Table'[Request number]) in _table1,1,0)
Measure1 =

var _table=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="opened"&&'Table'[groupe of support]="N0"))

var _table1=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="pending"&&'Table'[groupe of support]="N3"))

Return

IF(MAX('Table'[Request number]) in _table&&MAX('Table'[Request number]) in _table1,CALCULATE(DISTINCTCOUNT('Table'[Request number])),0)

 

Here is the output:

v-xulin-mstf_0-1611904403254.png

 

Here is the demo, please try it: Hwo to calculate transfered tickets from a group to another

Best Regards,

Link

 

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

3 REPLIES 3
v-xulin-mstf
Community Support
Community Support

Hi @ayoubb,

 

Try measure as:

Measure =

var _table=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="opened"&&'Table'[groupe of support]="N0"))

var _table1=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="pending"&&'Table'[groupe of support]="N1"))

Return

IF(MAX('Table'[Request number]) in _table && MAX('Table'[Request number]) in _table1,1,0)
Measure1 =

var _table=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="opened"&&'Table'[groupe of support]="N0"))

var _table1=CALCULATETABLE(VALUES('Table'[Request number]),FILTER(ALL('Table'),'Table'[Status]="pending"&&'Table'[groupe of support]="N3"))

Return

IF(MAX('Table'[Request number]) in _table&&MAX('Table'[Request number]) in _table1,CALCULATE(DISTINCTCOUNT('Table'[Request number])),0)

 

Here is the output:

v-xulin-mstf_0-1611904403254.png

 

Here is the demo, please try it: Hwo to calculate transfered tickets from a group to another

Best Regards,

Link

 

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

amitchandak
Super User
Super User

@ayoubb , Try a measure like

countx(filter(Summarize(table, Table[ticket number], "_1", calculate(count(Table[ticket number]), filter(Table,Table[Group of supporte] ="N0")), "_2", calculate(count(Table[ticket number]), filter(Table,Table[Group of supporte] ="N1"))), [_1]>0 && [_2]>0),[ticket number])

I have tested and itried this mesure to calcule all other tickets that they have been transfered from N0 to other groupe except N1, is this mesure below correct??: 

countx(filter(Summarize(table, Table[ticket number], "_1", calculate(count(Table[ticket number]), filter(Table,Table[Group of supporte] ="N0")), "_2", calculate(count(Table[ticket number]), filter(Table,Table[Group of supporte] <>"N1"))), [_1]>0 && [_2]>0),[ticket number])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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