cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
shamly
Frequent Visitor

Column name selection not coming while writing a New measure with IF condition

I have one table from snowflake dwh named Table1.

I created two measures Measure 1 and Measure 2 based on Column1 from table.

Measure 1 = Percentile.exc(Column1,0.7)

Measure 2 = Percentile.exc(Column1,0.9) .

Now I need to create a Measure 3.

Measure 3= IF(Column1 > Measure1 and Column 1< Measure 2, then Value1 else Value 2).

How will I write this?.

Column 1 is having 10 rows with values from 1 to 10.

Please help me 😞

1 ACCEPTED SOLUTION

Accepted Solutions
Omega Post Prodigy
Post Prodigy

Re: Column name selection not coming while writing a New measure with IF condition

Create the below measure: 

 

if (sum (Column1) > Measure1 && sum (Column1) < Measure2, Value1, value2)

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

Re: Column name selection not coming while writing a New measure with IF condition

@shamly 

Try

Measure 3= Sumx(Table,IF(Table[Column1] > [Measure1] && Table[Column 1]< [Measure 2], Table[Value1] , Table[Value 2]))
OR
Measure 3=sumx(summarize(table,table[ID],Table[Column1], Table[Value1] , Table[Value 2],"_mes1",[Measure1],"_mes2",[Measure 2]),
		IF([Column1] > [Measure1] && [Column 1]< [Measure 2], [Value1] , [Value 2]))

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blog -Week is not so Weak Proud to be a Super User! Connect on Linkedin


Omega Post Prodigy
Post Prodigy

Re: Column name selection not coming while writing a New measure with IF condition

Create the below measure: 

 

if (sum (Column1) > Measure1 && sum (Column1) < Measure2, Value1, value2)

View solution in original post

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors