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
Anonymous
Not applicable

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

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

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])

3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

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])

3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

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.