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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
user35131
Helper III
Helper III

Is there a way to group by ID and assign a value if at least one row is not blank?

I have a table that looks like this. Note that I want to group by "ID". ID 3 has all blanks so it doesn't fit the criteria. 1 does because at least one value is not blank. 2 also fits the criteria since one row is not blank.

 

IDValue
13
13
24
2 
3 
3 
3 
45

 

I would want the result to look like this

 

 

IDValueResult
13Yes
13Yes
24Yes
2 Yes
3 

No

3 No
3 No
45Yes

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

this is how you can

Столбец = 
 VAR _currentvalue = [ID]
 ВАР _Результаты=
    
         ВЫЧИСЛИТЬ (
             СТРАНЫ (),
             ФИЛЬТР ( 'таблица', 'таблица'[ID] = _currentvalue && IПУСТО ('таблица'[значение] ))
             ВОЗВРАЩАТЬСЯ
             ЕСЛИ( ЕСТЬПУСТО(_Результаты)||_Результаты=1,"ДА",
     "НЕТ"
  ) 

 

Screen Capture #194.png

View solution in original post

4 REPLIES 4
Ahmedx
Super User
Super User

also possible like this:

 

 

 

Column = 
VAR _currentvalue = [ID]
VAR _Results=
    
        CALCULATE (
            COUNTROWS (),
            FILTER ( 'tbl', 'tbl'[ID] = _currentvalue && ISBLANK ( 'tbl'[Value] ) ))
            RETURN
if (_Results >= 2,"NO","YES")

 

 

 

Nathaniel_C
Super User
Super User

Hi @user35131 ,

 

Like this?

Nathaniel_C_0-1672270312223.png

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @user35131 ,

 

Let me know if this works for you.


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel

 

Nathaniel_C_1-1672270504019.png

Original Table

 

Nathaniel_C_2-1672270590465.png

 

Add Index to keep original order

Nathaniel_C_3-1672270716488.png

Group rows as above

 

Nathaniel_C_4-1672270828987.png

Expand Detail

 

Nathaniel_C_5-1672270955326.png

 

Add Conditional column

Then I renamed it and changed types.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ahmedx
Super User
Super User

this is how you can

Столбец = 
 VAR _currentvalue = [ID]
 ВАР _Результаты=
    
         ВЫЧИСЛИТЬ (
             СТРАНЫ (),
             ФИЛЬТР ( 'таблица', 'таблица'[ID] = _currentvalue && IПУСТО ('таблица'[значение] ))
             ВОЗВРАЩАТЬСЯ
             ЕСЛИ( ЕСТЬПУСТО(_Результаты)||_Результаты=1,"ДА",
     "НЕТ"
  ) 

 

Screen Capture #194.png

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.