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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Pikachu-Power
Impactful Individual
Impactful Individual

Divide Problem in a Table

Hello,

I have a strange problem by dividing numbers. May someone can help. I have the following table (changed the numbers for an example):

 

1.PNG

 

For every Quarter I want a different calculation that works with no problem:

 

Measure1 =
SUMX (
    Table,
    SWITCH (
        TRUE (),
        Table[Quarter] = 1, Table[Ist]-Table[Budget],
        Table[Quarter] = 2, Table[Ist]-Table[FCI],
        Table[Quarter] = 3, Table[Ist]-Table[FCII],
        Table[Quarter] = 4, Table[Ist]-Table[FCIII],
        "Quarter unknown"
 
Now I want to divide the result of Measure1 by Budget, FC I, FC II or FC III in dependency of the Quarter
and I get completely wrong numbers:
 
Measure2 =
SUMX(
    Table,
    SWITCH (
        TRUE (),
        Table[Quarter] = 1, DIVIDE(Table[Measure1] , Table[Budget]),
   Table[Quarter] = 2, DIVIDE(Table[Measure1] , Table[FCI]),
        Table[Quarter] = 3, DIVIDE(Table[Measure1] , Table[FCII]),
        Table[Quarter] = 4, DIVIDE(Table[Measure1] , Table[FCIII]),
        "Quarter unknown"
    )
)
 
Does someone see the error or is there maybe a better / more uncomplicated way to calculate that?
 
Many thanks.
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pikachu-Power , Try measure 2 like

 

Measure2 =
divide([Measure1],
SUMX(
Table,
SWITCH (
TRUE (),
Table[Quarter] = 1, , Table[Budget],
Table[Quarter] = 2, , Table[FCI],
Table[Quarter] = 3, , Table[FCII],
Table[Quarter] = 4, , Table[FCIII],
blank()
)
) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Pikachu-Power , Try measure 2 like

 

Measure2 =
divide([Measure1],
SUMX(
Table,
SWITCH (
TRUE (),
Table[Quarter] = 1, , Table[Budget],
Table[Quarter] = 2, , Table[FCI],
Table[Quarter] = 3, , Table[FCII],
Table[Quarter] = 4, , Table[FCIII],
blank()
)
) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.