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

Summarizecolumns with Distinctcount and filter

Hi everyone!

 

I want to create a table from another one with SUMMARIZECOLUMNS.

 

Summary Table =
SUMMARIZECOLUMNS (
'Check-List Bayer / Autoelevador'[Campo de fecha del formulario],
"Maquinas por día", DISTINCTCOUNT('Check-List Bayer / Autoelevador'[Equipo]))
 
Now I have to make the DISTINCTCOUNT from the Equipo column but i need to exclude some values : "Eléctrica 1", "Eléctrica 2", "Eléctrica 3", "Eléctrica 4".
 

I tried adding a filter but the function does not work.

Does anyone have an idea?

 

Thanks a lot!

 

Jean-Ri

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

Summary Table =
SUMMARIZECOLUMNS (
'Check-List Bayer / Autoelevador'[Campo de fecha del formulario],
"Maquinas por día",
calculate(DISTINCTCOUNT('Check-List Bayer / Autoelevador'[Equipo]), filter('Check-List Bayer / Autoelevador', not( 'Check-List Bayer / Autoelevador'[Equipo] in { "Eléctrica 1", "Eléctrica 2", "Eléctrica 3", "Eléctrica 4"}))) )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try like

Summary Table =
SUMMARIZECOLUMNS (
'Check-List Bayer / Autoelevador'[Campo de fecha del formulario],
"Maquinas por día",
calculate(DISTINCTCOUNT('Check-List Bayer / Autoelevador'[Equipo]), filter('Check-List Bayer / Autoelevador', not( 'Check-List Bayer / Autoelevador'[Equipo] in { "Eléctrica 1", "Eléctrica 2", "Eléctrica 3", "Eléctrica 4"}))) )

Anonymous
Not applicable

@amitchandak, So I tried reformatting yours to work with mine and I'm getting a "THe expression refers to multiple columns. Multiple columns cannot be converted t a scalar value"

Any ideas waht that means?

SUMMARIZECOLUMNS (
'DTS_BII_Fact_Stops'[StopArrivalDate],
"Tractors",
calculate(DISTINCTCOUNT('DTS_BII_Fact_Stops'[TractorID]), filter('DTS_BII_Fact_Stops', ( 'DTS_BII_Fact_Stops'[ResourceType] in { "Fixed"}))) )

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.