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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
tusharsinghtanw
Regular Visitor

undefined

rep.PNG

Hi, how can i replicate the above formula in Power BI, i am unable to do so?

please help.

need to get the sum of those names who have delivered in last three months consistenly.

1 REPLY 1
mike775
New Member

@tusharsinghtanw 

 

Although you asked about Power BI, I would highly recommend using the "IFS" function in Excel instead of nested IF statements.  It is both easier/simpler to write, and easier for other people to understand.

 

DAX does not have IFS, instead you can use the SWITCH function.  Something like this:

 

 

COLUMN = 
SWITCH(
	TRUE()

	, table[period] = 201809 
	|| table[period] = 201809 - 1 
	|| table[period] = 201809 - 2
	, "Condition 1"

	, CALCULATE(
		SUM(table[Complete/Sent Approval Sites])
		, FILTER(
			table
			, table[Engineer Name] = EARLIER(table[Engineer Name])
			)
		, FILTER(
			table
			, table[Period] = EARLIER(table[Period])
			)
		)
	> 0
	, "Condition 2"

	, "Everything Else"
	)

 

 

Obviously your formula is much more complicated, so you will have to build this out, but that is the basic structure.

 

More broadly speaking, Power BI is not Excel.  It has different strengths and a different way of approaching things.  This same result can be achieved much easier using a built out data model and the functionality of measures / visuals in Power BI.  

 

 

 

 

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors