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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors