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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.