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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
AnneMi
Frequent Visitor

Countif with multiple criteria

Hi, 

I want to make a measure to count how many uniqe "Numbers" That has a value from the colon: "Special" 

 

AnneMi_0-1670923360788.png

AnneMi_1-1670923396834.png

 

 

1 ACCEPTED SOLUTION
JamesRobson
Resolver II
Resolver II

Hi,

 

 Quick solution would be to Pivot the Special and Number columns using a count not blank? Not sure if you have a specific layout required post count or not.

JamesRobson_0-1670924703150.png

 

 

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Number", Int64.Type}, {"Special", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Number", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Number", type text}}, "en-GB")[Number]), "Number", "Special", List.NonNullCount)
in
#"Pivoted Column"

 

Thanks,

View solution in original post

1 REPLY 1
JamesRobson
Resolver II
Resolver II

Hi,

 

 Quick solution would be to Pivot the Special and Number columns using a count not blank? Not sure if you have a specific layout required post count or not.

JamesRobson_0-1670924703150.png

 

 

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Number", Int64.Type}, {"Special", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Number", type text}}, "en-GB"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Number", type text}}, "en-GB")[Number]), "Number", "Special", List.NonNullCount)
in
#"Pivoted Column"

 

Thanks,

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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