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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jolind1996
Resolver II
Resolver II

Divide two numbers from the same table

Hi!

 

I would like to divide the column Verdi for KPI ID 9 with KPI ID 8 for each Måned.

E.g.: 2023, Måned 2; Holdningsindeks should be 2/20 = 10 %.

Any suggestions?

 

jolind1996_2-1679572662779.png

 

 

1 ACCEPTED SOLUTION
jolind1996
Resolver II
Resolver II

Solved, using: 

Holdningsindeks =
    DIVIDE(
        CALCULATE(SUM(FactHoldningsindeks[Verdi]); FILTER(FactHoldningsindeks; FactHoldningsindeks[KPI ID]=9));
        CALCULATE(SUM(FactHoldningsindeks[Verdi]); FILTER(FactHoldningsindeks; FactHoldningsindeks[KPI ID]=8))
    )

View solution in original post

2 REPLIES 2
Anand24
Super User
Super User

@jolind1996 ,
You can simply use below optimized DAX for better performance:

Holdningsindeks = 
CALCULATE(SUM(FactHoldningsindeks[Verdi]), FactHoldningsindeks[KPI ID]=9) / CALCULATE(SUM(FactHoldningsindeks[Verdi]), FactHoldningsindeks[KPI ID]=8)

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

jolind1996
Resolver II
Resolver II

Solved, using: 

Holdningsindeks =
    DIVIDE(
        CALCULATE(SUM(FactHoldningsindeks[Verdi]); FILTER(FactHoldningsindeks; FactHoldningsindeks[KPI ID]=9));
        CALCULATE(SUM(FactHoldningsindeks[Verdi]); FILTER(FactHoldningsindeks; FactHoldningsindeks[KPI ID]=8))
    )

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.