Forum Discussion

sanjaymithran's avatar
sanjaymithran
Helper II
4 months ago
Solved

Count Policy By Country

Hi All, Need help for slicers, in country slicer should display Country (Count Policy) as mentionede below Country Policy   Slicer US 342   Country US 223   US (8) US 6745   ...
  • grazitti_sapna's avatar
    4 months ago

    Hi sanjaymithran,

     

    You can achieve it by adding a new column in the table with DAX

     

    Country Display =
    PolicyData[Country] &
    " (" &
    CALCULATE(
        COUNT(PolicyData[Policy]),
        ALLEXCEPT(PolicyData, PolicyData[Country])
    )
    & ")"
     
    Attached is the example .pbix for you.
     
    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    πŸ’‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    πŸŽ– As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
    πŸ”— Curious to explore more? [Discover here].
    Let’s keep building smarter solutions together!