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

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

Reply
sagarsahoo_123
Helper IV
Helper IV

Need help to write DAX code for the below Query

Hello Team,

As i am new to this DAX code, i need your support to write the code for the below requirement. I have posted the sample table to make it simpler to understand.

I have a table having three column and i need to calculate sum of Column value A but the filter has to be applied on column B and C for specific requirement. 

Column ACol BCol C
1A 
0.75B9
1C 
1 9
0.75 9.75
1  

In the above column i need the sum value of Column A when Col B is having "Blank" value and Col C is having number value.

Here the result will be 1.75 as if you look at the 2nd and 3rd last row in which Col B is having blank cells and Col C is having Value as well. Please note Col B is having Text value where as Col C is filled with Numerical value.

 

Any help on DAX code is highly appreciated.

Many Thanks in Advance 


Regards,

Sagar

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

Hi @sagarsahoo_123 ,

 

This issue may caused by space value and blank value. Please check your Source data in Power Query. You can use Replace Value in Power Query.

Here is a simple example:

vjianbolimsft_0-1665565895258.png

vjianbolimsft_1-1665565913772.png

As you can see in the images, the two values are different in Text data type.

You can use Replace Value:

vjianbolimsft_2-1665566010352.png

vjianbolimsft_4-1665566056172.png

 

Final output:

vjianbolimsft_3-1665566030590.png

Best Regards,

Jianbo Li

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

5 REPLIES 5
v-jianboli-msft
Community Support
Community Support

Hi @sagarsahoo_123 ,

 

This issue may caused by space value and blank value. Please check your Source data in Power Query. You can use Replace Value in Power Query.

Here is a simple example:

vjianbolimsft_0-1665565895258.png

vjianbolimsft_1-1665565913772.png

As you can see in the images, the two values are different in Text data type.

You can use Replace Value:

vjianbolimsft_2-1665566010352.png

vjianbolimsft_4-1665566056172.png

 

Final output:

vjianbolimsft_3-1665566030590.png

Best Regards,

Jianbo Li

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

Hello Team,

Thanks a lot for  such detailed explanation and quick support. It helped to get the desired result. Really appreciated. 

 

Regards,

Sagar

v-jianboli-msft
Community Support
Community Support

Hi @sagarsahoo_123 ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

Hi Team,

I tried with the method you suggested and but if you look at the May 2022 data which i am attaching the PBIX file link here, it is showing only value 1.

Please see the Card Visulaization in the Details Page where DigiACT HC is showing 1 for the may 2022 and i look at the data for May month there are two types of blank cells. One is (Blank) mentioned cell and other is blank cell.

If you look at the data, you will get an idea.

https://1drv.ms/u/s!AqNLfMSghxwyhgY6NBS9rDX05xon?e=iAdj4Y

Please download the PBIX file from the above link and suggest how this blank information of "Nippon Status" column can be corrected!

If you look at the Card formula, three columns are used like FTE,Nippon Status,Digiact hrs. Need to calculate the Sum(FTE) based on Blank value of Nippon status and Values of Digiact hrs.

 

Thanks a lot for your quick support.

Regards,

Sagar

johnt75
Super User
Super User

try

Col A total =
CALCULATE (
    SUM ( 'Table'[Column A] ),
    ISBLANK ( 'Table'[Column B] ),
    NOT ISBLANK ( 'Table'[Column C] )
)

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors