Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculate count if the values are double

Hi Team,

Below is my table, I want to use Agency and Teams as Slicer and need count of Status in Bar Graph.

If I use agency as In Slicer.

My slicer should look something like this

SWZ

AEZ

FZ

Teams as Slicer

HR

FIN

GS

Slicer Country

IND

UK

US

My staus should not get multipled if I split the cells. 3 completed 1 inprogess 2 delayed

 

If the user selects UK from Slicer he usled be able to see

 

AgencyCountryProjectSub Project TeamsStatus
SWZ, AEZIND,UK, USAAAHR, FIN,GSCompleted
SWZ, AEZIND,UK, USAABHR, FIN,GSIn Progress
SWZ, AEZIND,UK, USAACHR, FIN,GSDelayed
SWZ, AEZ,FZUS, UKBBAGSCompleted
SWZ, AEZ,FZUS, UKBBBGSCompleted
SWZ, AEZ,FZUS, UKBBCGSDelayed

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    You will need to create three slicer tables for agency, teams and country.

    Then use CONTAINSSTRING() function to mark the records that contain selected value from slicers.

    measure = if(containsstring(selectedvalue('Table'[Country]),selectedvalue(country[country])),1,0)

    At last use SUMX() function to get the count of records for each status.

    Measure 2 = SUMX(ALLEXCEPT('Table','Table'[Status]),[measure])

     

    Best Regards,

    Jay

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You will need to create three slicer tables for agency, teams and country.

    Then use CONTAINSSTRING() function to mark the records that contain selected value from slicers.

    measure = if(containsstring(selectedvalue('Table'[Country]),selectedvalue(country[country])),1,0)

    At last use SUMX() function to get the count of records for each status.

    Measure 2 = SUMX(ALLEXCEPT('Table','Table'[Status]),[measure])

     

    Best Regards,

    Jay