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
PaulMac
Helper IV
Helper IV

Need a DAX measure to replace an Excel function.

Hi

The table in the attached file is a Pivot Table with the exception of the last column (YTD Complaints per 1,000 Transactions) which is a formula that I have outlined above (column G).

The formula basically performs the following calculation:

 

Add together (Total No of Cases from all months in pivot) Divide by (Total No of Transactions from all months in pivot) x 1000

 

this formula looks like:

 

=SUMPRODUCT($C$8:C11)/SUMPRODUCT($D$8:D11)*1000

Simple enough, right?

 

Now, I need to create a DAX measure that will replace this formula so that I can be used in the existing pivot table and leter on in Power BI. I'm sure this can be done, just not with my current knowledge.

 

Sample Data file can be foud here.

 

Please speak slowy and with patience as I am still a noob!

Any and all help would be greatly appreciated.

PaulMc

1 ACCEPTED SOLUTION
RobbeVL
Impactful Individual
Impactful Individual

Hi there,


I wish everyone was as clear in describing their needs! 🙂 

I think the below will help you.

I simply created the running total for both columns, devided it and *1000.

Calc = 

DIVIDE(
CALCULATE(
	SUM('Table'[Number of Complaints]);
	FILTER(
		ALLSELECTED('Table'[Month]);
		ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC)
	)
); CALCULATE(
	SUM('Table'[Number of Key Transactions]);
	FILTER(
		ALLSELECTED('Table'[Month]);
		ISONORAFTER('Table'[Month]; MAX('Table'[Month]); DESC)
	)
)
)*1000

Hope this helps.

View solution in original post

16 REPLIES 16

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.