Forum Discussion

Mickey_mi's avatar
Mickey_mi
Frequent Visitor
8 months ago
Solved

Pbi online coach

Hello. Am looking if i can get help to take a look at my simple data. I am new to pbi and have problems fetching accurate numbers in a variance kpi card. Your little help will be a huge help to me. T...
  • Tahreem24's avatar
    8 months ago

    Mickey_mi  Welcome to Power BI Community. If you could share the test/sample data input along with expected output (ofcourse do not share your actual data) so we certain could help you.

     

     

  • Amar_Kumar's avatar
    Amar_Kumar
    8 months ago

    Assumptions:

    • You have a Date table with Date, Month, Year, Quarter

    • Actual and Planned are identifiable (separate columns or a type flag)

    Step 1: Actual Paid measure (current context)

    Actual Paid = SUM ( Fact[ActualPaid] )

    Step 2: Planned value from first month of the same quarter (Oct for 3Q)

    Planned (Quarter Base Month) =
    VAR CurrYear = SELECTEDVALUE ( 'Date'[Year] )
    VAR CurrQuarter = SELECTEDVALUE ( 'Date'[Quarter] )
    VAR BaseMonth =
    SWITCH (
    CurrQuarter,
    "Q1", 1,
    "Q2", 4,
    "Q3", 10,
    "Q4", 7)
    RETURN CALCULATE ( SUM ( Fact[Planned] ), FILTER (ALL ( 'Date' ), 'Date'[Year] = CurrYear && 'Date'[MonthNumber] = BaseMonth))

    Step 3: Variance

    Variance = [Actual Paid] - [Planned (Quarter Base Month)]

    Result for your example:

    • Actual Paid (Dec 2025) = 18

    • Planned (Oct 2025, same quarter) = 56

    • Variance = 18 - 56 = -38