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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

How To Use MOD

Merhabalar, PowerBI konusunda yeniyim ve bir konuda sorun yaşıyorum.

1.JPG

Stok adetlerimi, mod formülü kullanarak "Mod Değeri" sütunumu oluşturdum.

A = MOD(X , 4 , 0.2) => MOD(395 , 4 , 0,2) => 3

Ancak bu formülü kullandığım zaman sütun toplamı "0" = "C" geliyor.

Ayrıca "Kalan" sütunu içinde stok adetinden mod değerini çıkarıyorum.

B = X - A => 395 - 3 = 392

Ancak bu sütununda toplamı hatalı geliyor."Y"

Bu hataların önüne nasıl geçebilirim?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try this measure to create mod measure.

Mod =
VAR _SUMMAIZRE =
    SUMMARIZE (
        'Table',
        'Table'[Category],
        "Stok Adeti", CALCULATE ( SUM ( 'Table'[Stok Adeti] ) )
    )
VAR _ADD_MOD =
    ADDCOLUMNS ( _SUMMAIZRE, "MOD", MOD ( [Stok Adeti], 4 ) )
RETURN
    SUMX ( _ADD_MOD, [MOD] )
Kalan = SUM('Table'[Stok Adeti]) - [Mod]

Result is as below.

RicoZhou_0-1660725725800.png

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

I think you can try this measure to create mod measure.

Mod =
VAR _SUMMAIZRE =
    SUMMARIZE (
        'Table',
        'Table'[Category],
        "Stok Adeti", CALCULATE ( SUM ( 'Table'[Stok Adeti] ) )
    )
VAR _ADD_MOD =
    ADDCOLUMNS ( _SUMMAIZRE, "MOD", MOD ( [Stok Adeti], 4 ) )
RETURN
    SUMX ( _ADD_MOD, [MOD] )
Kalan = SUM('Table'[Stok Adeti]) - [Mod]

Result is as below.

RicoZhou_0-1660725725800.png

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Merhaba,

 

what is your expected result for these columns?  Do you want to sum up the remainders of the divisions for each row?

 

Note that the MOD function only accepts two parameters.  Not sure what your 0.2  is about.

 

MOD function (DAX) - DAX | Microsoft Docs

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.