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

How to summarize only selected columns, please check the attached file

I have three columns in a table and we are using parameters to select the required column to the table.
Based on the selected column, I need to summarize and do some calculation.
I am stuck and unable to find how to make “VAR SUMMERISE” to work, this variable should summerize the selected columns only. I am using this to find the denominator.
It works fine when all three columns are selected, but I need to summerize based on the selected column
Parameter are [column names]: We have a slicer on the page

 

🔲Partnername

☑️partnerTYPE

☑️partnercountry



I need a syntax to summarize just the selected columns

Uniques =
VAR sumfc = SUM(salary)
VAR SUMMARISE = SUMMARIZE(Partnername, Partnercountry, partnerTYPE, "Average", sumfc)
RETURN
    IF(
        OR(
            ISINSCOPE('Partnername'),
            OR(ISINSCOPE('Partnercountry'), ISINSCOPE(partnerTYPE))
        ),
        SUM(salary),
        DIVIDE(sumfc, COUNTROWS(SUMMARISE))
    )
1 REPLY 1
SwathiGanesh
Frequent Visitor

Can add sample file, please give me permission

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.