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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register 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
Community Champion
Community Champion

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.