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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Rajendrabobade
Helper II
Helper II

Need total of calculated if condition measure

Hello,

 

I need a total of calculated measure(formula 2) for example :

Formula 1 -divide(sales ]),DATEDIFF(MAX('Calendar'[Start Year]),MAX('Calendar'[Date]),MONTH) +1 )

Formula 2- if(formula 1>=300,1,0)

In below table i need formula 2 total sholud be 1+1 = 2 but still  showing 0 please guide me for this .

 

salesformula 1formula 2
5002500
7003501
8004001
Total - 2000Total - 1000Total -0

 

 

kindly help me .

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Rajendrabobade , if(formula 1>=300,1,0)

 

Need a context , so if do not give that, if will re calculate at grand total level

 

assume you have a group by in visual you can try

 

sumx(Summarize(Table, Table[Column], "_1",if([formula 1]>=300,1,0)),[_1])

 

refer: https://www.youtube.com/watch?v=qE5KBp4uP0g

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Rajendrabobade , if(formula 1>=300,1,0)

 

Need a context , so if do not give that, if will re calculate at grand total level

 

assume you have a group by in visual you can try

 

sumx(Summarize(Table, Table[Column], "_1",if([formula 1]>=300,1,0)),[_1])

 

refer: https://www.youtube.com/watch?v=qE5KBp4uP0g

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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