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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to calculate blank rows from calculated measure by summarize other columns

Hello All,

I am trying to do the following thing but no luck.

Please find below the snapshot:

20220120_120150.jpg

Here, I need to calculate the total no of stores available in Banner(3rd Col), but need to apply a filter there, the Total Loss Amt(4th Col) should not be blank.

The No of stores is calculated as Calculate(count([StoreID]), All(store[StoreID]))

(I have used ALL because I need to calculate all the stores available in banner even if single store select it need to show all the stores)

 

For Eg: Here in D&D Banner 19 stores are there but [Total Loss Amt] is blank for three stores, so it should return only 16

 

Please help here

 

Thanks

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I have tried to simulate some of the data hoping to restore your problem.

Measure:

The No of stores = 
CALCULATE (
    COUNT ( [StoreID] ),
    FILTER ( ALL ( 'Table' ), [Total Loss Amt] <> BLANK () )
)

This is where [Total Loss Amt] is Measure, and the method is the same if [Total Loss Amt] is a column.

vzhangti_1-1643098250672.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I have tried to simulate some of the data hoping to restore your problem.

Measure:

The No of stores = 
CALCULATE (
    COUNT ( [StoreID] ),
    FILTER ( ALL ( 'Table' ), [Total Loss Amt] <> BLANK () )
)

This is where [Total Loss Amt] is Measure, and the method is the same if [Total Loss Amt] is a column.

vzhangti_1-1643098250672.png

If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?

 

Best Regards,

Community Support Team _Charlotte

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

Anonymous
Not applicable

Hi @Greg_Deckler ,

 

Thanks for uick reply.

 

I have tried this but it return "1" to every row.

Not useful for me.

 

Thanks

@Anonymous I would need sample/example source data to understand what is going on. 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Anonymous So like this?

Calculate(count([StoreID]), All(store[StoreID]), NOT(ISBLANK([Total Loss Amt])))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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