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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Main Fact VS Target Fact (KPI's)

Greeting members 

 

i have 2 fact tables : Fact_School where there is all  details about the school everyday  and another table called School_target where i have the target detail per month .

Fact _School : 

Rfrikha1992_0-1633365430755.png

 

School_target : 

Rfrikha1992_1-1633365547683.png

 

both tables have a relation with a Dim_date and dim_class .

 

what im trying to calculate is the pourcentage of  charge acheived and  the pourcentage of  charge acheived YTD.

 

Thanks all for your help.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 

Create measures like

Ratio=  divide(Sum(fact_school[Charges]), sum(Target[Target]))

 

Ratio YTD = calculate([Ratio], datesytd(Date[Date]))

 

Along with common date table, have common school table too

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous 

Create measures like

Ratio=  divide(Sum(fact_school[Charges]), sum(Target[Target]))

 

Ratio YTD = calculate([Ratio], datesytd(Date[Date]))

 

Along with common date table, have common school table too

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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