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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GoingIncognito
Advocate III
Advocate III

Sumx, format and crossfilter

I've a matrix that gets its rows from two tables: a dimension table for instruments traded in stock market and a fact table of of traded stocks. I've no column values in the table, and all the values come from the fact table. Quite simple.

Now, I need to format the numbers in my matrix like this: 999 999 999.99. And so far I had great success using creating new measures that used older measures I had written (before the need to format) like this: Format([measure], "### ### ###.#0"). This worked fine untill now.

I have a simple measure: sumx(filter(fact, fact[date]=max(fact[date])), fact[amount]). But when ever I use format on this measure the matrix shows all the rows. Even the blank ones. So somehow the format with sumx breaks up the crossfiltering between tables? I tried one variation of crossfilter(fact,dimension,both) but that didn't work either. How should I proceed? What sort of a measure should I write?

For the format withouth crossfilter I tried:

1  format(sumx())

2 sumx(filter(),format()).

 

Thank you!

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@GoingIncognito ,

 

Format the measure using dax like pattern below:

Measure =
IF (
    MAX ( fact[date] ) = CALCULATE ( MAX ( fact[date] ), ALL ( fact ) ),
    FORMAT (
        SUMX ( FILTER ( fact, fact[date] = MAX ( fact[date] ) ), fact[amount] ),
        "### ### ###.#0"
    ),
    BLANK ()
)

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@GoingIncognito ,

 

Format the measure using dax like pattern below:

Measure =
IF (
    MAX ( fact[date] ) = CALCULATE ( MAX ( fact[date] ), ALL ( fact ) ),
    FORMAT (
        SUMX ( FILTER ( fact, fact[date] = MAX ( fact[date] ) ), fact[amount] ),
        "### ### ###.#0"
    ),
    BLANK ()
)

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

It should be

format(sumx(filter(),[measure]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amit for declaring the right syntax!

Finally I solved this with very simple if:

if(sumx()<>0, sumx(), blank())

 

now I don't get blank rows. But this still doesn't make sense to me, why I'd get blank rows in the first place.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors