Forum Discussion

monishd's avatar
monishd
Frequent Visitor
1 year ago
Solved

How to return a TABLE in PowerBi

I have a measure that "counts" the number of rows which contains certain strings. I want a drill through for the visual that shows the count. How can I filter the table to show only those rows which were counted in the measure?

 

Here is the measure,

count_inc_for_disk_space_increase = CALCULATE(
    COUNT(IncidentTable[incident_number]),
    (
    CONTAINSSTRING(IncidentTable[short_description],"Extend Disk") ||
    CONTAINSSTRING(IncidentTable[short_description],"Increase Disk Space") ||
    CONTAINSSTRING(IncidentTable[short_description],"Space") ||
    CONTAINSSTRING(IncidentTable[short_description],"Clean and Remove") ||
    CONTAINSSTRING(IncidentTable[short_description],"Free Space") ||
    CONTAINSSTRING(IncidentTable[short_description],"Capacity is Full") ||
    CONTAINSSTRING(IncidentTable[short_description],"Increase the VM Capacity") ||
    CONTAINSSTRING(IncidentTable[short_description],"Requesting to increase")
    )
)
 
I only want these incidents which are counted in this measure to be displayed in the table.
  • monishd Create a calculated column in your IncidentTable that checks if the short_description contains any of the specified strings.

    IncidentTable[IsDiskSpaceRelated] =
    IF(
    CONTAINSSTRING(IncidentTable[short_description], "Extend Disk") ||
    CONTAINSSTRING(IncidentTable[short_description], "Increase Disk Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Clean and Remove") ||
    CONTAINSSTRING(IncidentTable[short_description], "Free Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Capacity is Full") ||
    CONTAINSSTRING(IncidentTable[short_description], "Increase the VM Capacity") ||
    CONTAINSSTRING(IncidentTable[short_description], "Requesting to increase"),
    1,
    0
    )

     

    Use this calculated column to filter the table visual. You can do this by adding a filter to the table visual where IsDiskSpaceRelated equals 1.

2 Replies

  • monishd Create a calculated column in your IncidentTable that checks if the short_description contains any of the specified strings.

    IncidentTable[IsDiskSpaceRelated] =
    IF(
    CONTAINSSTRING(IncidentTable[short_description], "Extend Disk") ||
    CONTAINSSTRING(IncidentTable[short_description], "Increase Disk Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Clean and Remove") ||
    CONTAINSSTRING(IncidentTable[short_description], "Free Space") ||
    CONTAINSSTRING(IncidentTable[short_description], "Capacity is Full") ||
    CONTAINSSTRING(IncidentTable[short_description], "Increase the VM Capacity") ||
    CONTAINSSTRING(IncidentTable[short_description], "Requesting to increase"),
    1,
    0
    )

     

    Use this calculated column to filter the table visual. You can do this by adding a filter to the table visual where IsDiskSpaceRelated equals 1.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi monishd 

    Thanks for reaching out to the Microsoft Fabric Forum Community.


    And aslo Thanks to bhanu_gautam  for Promt and useful response.

     

    Just following up to see if the solution provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

    If the response addressed your query, kindly mark it as Accepted Solution and click Yes if you found it helpful — this will benefit others in the community as well.

     

    Best regards,

    Prasanna Kumar