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
Chandrarao
Frequent Visitor

Dax query to calculate % of a category from using existing and display the % in new column

I have a existing cloumn in my dataset which contains text data like below type of catogeries. I am using this column to identify the source which detecting the issue, like this i do have different sources to detecet the issues. The requirement is to create a new column from "NotificationSourceType" column where the NotificationSourceType is only "Monitoring" and i want to calculate percentage of monitoring type issues and calculate the percentagen also display it in new column. This data set will refresh everyday.

 

Ex: If i have 300 issues detected by monitoring out of 700 issues then 300/700*100= 43%. I need DAX query to count "Monitoring" type issues from "NotificationSourceType" column, calculate the percentage of monitoring type issues, and dispaly percentage(%) in new column.

 

NotificationSourceType

Partner
Monitoring
Customer  
Service
Unknown
Other
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Chandrarao

 

Try this Column

 

Calculated Column =
IF (
    TableName[NotificationSourceType] = "Monitoring",
    DIVIDE (
        CALCULATE (
            COUNT ( TableName[NotificationSourceType] ),
            TableName[NotificationSourceType] = "Monitoring"
        ),
        COUNTROWS ( TableName )
    )
)

 

 


Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Chandrarao

 

Try this Column

 

Calculated Column =
IF (
    TableName[NotificationSourceType] = "Monitoring",
    DIVIDE (
        CALCULATE (
            COUNT ( TableName[NotificationSourceType] ),
            TableName[NotificationSourceType] = "Monitoring"
        ),
        COUNTROWS ( TableName )
    )
)

 

 


Regards
Zubair

Please try my custom visuals

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.

Top Solution Authors