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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Harish85
Helper I
Helper I

count blank and non blank faksp values based on Contract.

HI Required a count of Blank and non blank values with contract ID, if both values are present for one contract ID that Id should not be seen in the report. for marked column there will be both blank and non blankfor marked column there will be both blank and non blank

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

Hi @Harish85 ,

 

Depend on your description, you can try follow steps:

1.Create a Calculated Column:

FAKSP_ECC_Status = IF(ISBLANK('Table'[FAKSP_ECC]), "Blank", "Non-Blank")

vkongfanfmsft_0-1721724786639.png

2.Create a Measure to Count Blank and Non-Blank Values:

Count_Blank = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[FAKSP_ECC_Status] = "Blank"))
Count_Non_Blank = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[FAKSP_ECC_Status] = "Non-Blank"))

vkongfanfmsft_1-1721724850089.png

3.Create a measure to exclude contracts with both blank and non-blank values:

Filtered_Contracts = 
IF(
    [Count_Blank] > 0 && [Count_Non_Blank] > 0,
    BLANK(),
    MAX('Table'[CONTRACT])
)

 

vkongfanfmsft_2-1721725019561.png

 

Best Regards,
Adamk Kong

 

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

2 REPLIES 2
Harish85
Helper I
Helper I

thank you for taking the time and replying, but there are two data base tables coming from different data source, FAKSP_ecc(column) is coming from second table and Contract is coming from first table, then also it works?

v-kongfanf-msft
Community Support
Community Support

Hi @Harish85 ,

 

Depend on your description, you can try follow steps:

1.Create a Calculated Column:

FAKSP_ECC_Status = IF(ISBLANK('Table'[FAKSP_ECC]), "Blank", "Non-Blank")

vkongfanfmsft_0-1721724786639.png

2.Create a Measure to Count Blank and Non-Blank Values:

Count_Blank = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[FAKSP_ECC_Status] = "Blank"))
Count_Non_Blank = CALCULATE(COUNTROWS('Table'), FILTER('Table', 'Table'[FAKSP_ECC_Status] = "Non-Blank"))

vkongfanfmsft_1-1721724850089.png

3.Create a measure to exclude contracts with both blank and non-blank values:

Filtered_Contracts = 
IF(
    [Count_Blank] > 0 && [Count_Non_Blank] > 0,
    BLANK(),
    MAX('Table'[CONTRACT])
)

 

vkongfanfmsft_2-1721725019561.png

 

Best Regards,
Adamk Kong

 

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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