powerbidaxpowerbi-desktopmeasuredaxstudio

Column totals are doubling in Powerbi


I have a dataset as below

Source     FYandFWnum  Measure
Company A   202448      1 *
Company B   202448      2 *
Company C   202448      3 *
Company A   202447      4
Company B   202447      5
Company C   202446      6

Code I am using is

Measure = 
VAR CurrentFiscalWeek = MAX( 'DF'[FYandFWnum] )
RETURN
CALCULATE(
     [Sum_Amt],
    'DF'[FYandFWnum] = CurrentFiscalWeek
)

What I am getting: If all the measures exist for each Source then Subtotal in Powerbi doubles the subtotal

              202446     202447   202448
Company A                   4         1
Company B                   5         2
Company C       6                     3
-----------------------------------------
Subtotal        6           9         12 ***

How to get around with this? many thanks in advance.


Solution

  • Using your test data, I get the following:

    enter image description here