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
AparnaJ
Helper I
Helper I

Using If or Case along with Group by

Hi,

We have a requirement, below is the data file. 

Logic is as follows based on concept_name

If Blast count <5; ANC ≥ 1;Platelet ≥ 100 then "good" group by synth_id,measurement_date. Please provide your suggestiosn how to acheive this.

Thank you.

Aparna

 

data Filedata File

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

Hi @AparnaJ 

I find no text ("blast count", "ANC") in your example table.

As searched, "ANC" seems to have a similar meaning as Neutro.

 

If you recongnize Neutro as "ANC", you could take the following steps:

1. In Power Query Editor, select column ‘concept_name’, and then click ‘Pivot Column’ and choose ‘value’ as ‘Value Column’.

Capture16.JPG

 

2. Does the statement -"If Blast count <5; ANC ≥ 1;Platelet ≥ 100 then "good" group" mean:

Blast count <5 and ANC ≥ 1 and Platelet ≥ 100, these conditions are all Satisfied so that the group is a "good" one,

If so, Create a column

group column = IF('Table'[Neutro]>=1 && 'Table'[Platelets]>=100,"good","bad")

Capture17.JPG

 

Best Regards
Maggie

 

Community Support Team _ Maggie 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

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @AparnaJ 

I find no text ("blast count", "ANC") in your example table.

As searched, "ANC" seems to have a similar meaning as Neutro.

 

If you recongnize Neutro as "ANC", you could take the following steps:

1. In Power Query Editor, select column ‘concept_name’, and then click ‘Pivot Column’ and choose ‘value’ as ‘Value Column’.

Capture16.JPG

 

2. Does the statement -"If Blast count <5; ANC ≥ 1;Platelet ≥ 100 then "good" group" mean:

Blast count <5 and ANC ≥ 1 and Platelet ≥ 100, these conditions are all Satisfied so that the group is a "good" one,

If so, Create a column

group column = IF('Table'[Neutro]>=1 && 'Table'[Platelets]>=100,"good","bad")

Capture17.JPG

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.