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
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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.