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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Calculate a value based on 4 KPI's for each customer

Hi,

 

I'm stuck with a problem and I'm hoping you guys can help me out. I have a star schema like the picture below:

 

KPICALC.PNG

 

What I want to do is to calculate a common value based on all four KPI's. What I have in mind is to create a function like this:

 

f(x) = claimsKPI(x) + callsKPI(x) + logisticsKPI(x) + salesKPI(x), where x = customerID. 

 

I have around 10k customers in my FACT table.

And as you might have understood from the picture each KPI is in different tables. 

 

My efforts so far has been trying to use R, but I'm still a newbie in this area and I'm not sure it will be enough since R in Power BI has a limitation to calculation on 150 000 rows and some of my dimTables have more then 2 million rows. 

 

I've also tried to calculate a column in the FACT table with DAX where the result of the function for each customer is placed. But I'm not sure DAX can make it, especially in a later stage when I want to know what f(x) was each week for e.g 10 weeks back. 

 

 

 

Anyone got any suggestions or could steer me into a direction of similar cases? 

 

Any help would be much appreciated.

 

 

 

 

 

1 REPLY 1
Greg_Deckler
Super User
Super User

You will likely want to use a measure. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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