cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
sshiny
Helper II
Helper II

Finding count

Unable to find the count of tsg id with respect to the tsg owner

sshiny_0-1654593772970.png

 

"Total procedure completed" column should calculate how m

1 ACCEPTED SOLUTION

Hi @sshiny ,

 

I suggest you to create a calculated column by code as below.

Count of tags with respect to the unique tag owner =
VAR _Tag_Owner_List =
    CALCULATETABLE (
        VALUES ( 'Table'[TAG_OWNER] ),
        ALLEXCEPT ( 'Table', 'Table'[Tag Id] )
    )
VAR _COUNT_OF_LIST =
    COUNTAX ( _Tag_Owner_List, [TAG_OWNER] )
RETURN
    IF ( _COUNT_OF_LIST = 1, 1, BLANK () )

Result is as below.

RicoZhou_0-1654848295999.png

RicoZhou_1-1654848303357.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

4 REPLIES 4
Tahreem24
Super User
Super User

@sshiny Try this Measure:

MEASURE = CALCULATE(COUNT(Table[Tag ID]),ALLEXCEPT(TableName,Table[Tag Owner]))

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
sshiny
Helper II
Helper II

@NickolajJessen I am trying to find the count of tags with respect to the unique tag owner.

My DATA-

sshiny_0-1654598281005.png

I need a third column that gives the value of the count of tags for tag owner "A" and the value of the count of tags for tag owner "B" 

Hi @sshiny ,

 

I suggest you to create a calculated column by code as below.

Count of tags with respect to the unique tag owner =
VAR _Tag_Owner_List =
    CALCULATETABLE (
        VALUES ( 'Table'[TAG_OWNER] ),
        ALLEXCEPT ( 'Table', 'Table'[Tag Id] )
    )
VAR _COUNT_OF_LIST =
    COUNTAX ( _Tag_Owner_List, [TAG_OWNER] )
RETURN
    IF ( _COUNT_OF_LIST = 1, 1, BLANK () )

Result is as below.

RicoZhou_0-1654848295999.png

RicoZhou_1-1654848303357.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

NickolajJessen
Solution Sage
Solution Sage

Hi,

Make sure to share data in a table format for easy entry in Power Bi for anyone who is try to help

Can you share an illustration of you expected result?

Also include what you've tried to far (measure)

Refer to this thread on how to make a detailed post for a quick soloution 😊
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/2547186#M9020...

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors