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
HenryJS
Post Prodigy
Post Prodigy

Count Ref IF

Hi all,

 

How do I create a measure which counts 'CompanyHQOriginalSourceRef' IF Type = "Business Development" or "Top 10"?

 

 

 

Comapnies screenshot.PNG

3 ACCEPTED SOLUTIONS
Mariusz
Community Champion
Community Champion

Hi @HenryJS 

 

Try This 

Measure = 
CALCULATE(
    DISTINCTCOUNT( 'Table'[CompanyHQOriginalSourceRef] ),-- or COUNTROWS( 'Table' ),
    'Table'[Type] IN { "Business Development", "Top 10" }
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

View solution in original post

v-shex-msft
Community Support
Community Support

Hi @HenryJS,

I haven't found any ranking fields in your table, can you please explain more about your data structure?

How to Get Your Question Answered Quickly 

In addition, You can try to use the following measure formula if it suitable for your requirement:

Measure =
CALCULATE (
    COUNTA ( Table[CompanyHQOriginalSourceRef] ),
    FILTER (
        ALLSELECTED ( Table ),
        [Type] = "Business Development"
            && [Rank] <= 10
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=CALCULATE(COUNTROWS(Data),Data[Type]="Business Development"||Data[Type]="Top 10")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=CALCULATE(COUNTROWS(Data),Data[Type]="Business Development"||Data[Type]="Top 10")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-shex-msft
Community Support
Community Support

Hi @HenryJS,

I haven't found any ranking fields in your table, can you please explain more about your data structure?

How to Get Your Question Answered Quickly 

In addition, You can try to use the following measure formula if it suitable for your requirement:

Measure =
CALCULATE (
    COUNTA ( Table[CompanyHQOriginalSourceRef] ),
    FILTER (
        ALLSELECTED ( Table ),
        [Type] = "Business Development"
            && [Rank] <= 10
    )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Mariusz
Community Champion
Community Champion

Hi @HenryJS 

 

Try This 

Measure = 
CALCULATE(
    DISTINCTCOUNT( 'Table'[CompanyHQOriginalSourceRef] ),-- or COUNTROWS( 'Table' ),
    'Table'[Type] IN { "Business Development", "Top 10" }
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

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.