Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Mjolnir
Helper I
Helper I

Measure: How do I make it ignore certain values in visual content?

Hi,
 
Want to create a measure that sums the values if the account number starts with a number greater than 2.
 
All accounts with values equal to blank, empty or zero should be ignored; all accounts starting with 2 or less should be ignored. Ignored data should not appear in visual content. Currently I have accounts starting with 1*** and 2*** appearing in my tables, and =>3*** with blank/empty/zeroes appearing as well.
 
I thought the filter would ignore and not include in the visuals but it seems like it does not.
 
How can I fix this changing the measure? And not through applied filters to the visual.
 
mActual =
CALCULATE(
    FORMAT(
        SUM(general_ledger_facts[value]), "### ### ### ###"),
        LEFT(dim_account[accountnumber],1)*1>2)
1 ACCEPTED SOLUTION

Thanks for your response. I changed the SUM to SUMX and it solved the problem.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

mActual =
FORMAT(
CALCULATE(
        SUM(general_ledger_facts[value]),
        LEFT(dim_account[accountnumber],1)>"2"),
, "### ### ### ###")

Thanks for your response. I changed the SUM to SUMX and it solved the problem.

In addition to my comment, sum and sumx alone seem to retrieve and only show accounts with existing values. The issue seemed to be caused by FORMAT, so removed the FORMAT in the function and all blanks disappeared.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.