Forum Discussion

smit16299's avatar
smit16299
Frequent Visitor
1 year ago
Solved

Paginated Report: Comparing Period A vs Period B Single Table Like Disconnected Slicer in Power BI

  Hi all, I’m trying to replicate a Power BI disconnected slicer approach in a paginated report. I have: Two parameters: PeriodA and PeriodB One dataset containing Custom_DIisplay_Name, Accou...
  • MohamedFowzan1's avatar
    1 year ago

    Hi smit16299 

     

    I have used disconnected parameters and have used same queries. Could you try to use nothing instead. See if this works

    =Sum(

      IIF(

        Fields!Period.Value = Parameters!PeriodA.Value,

        Fields!Amount_Custom_IS.Value,

        Nothing

      )

    )

     

    =Sum(

      IIf(

        Fields!Period.Value = Parameters!PeriodB.Value,

        Fields!Amount_Custom_IS.Value,

        Nothing

      )

    )

     

    =Sum(

      IIf(

        Fields!Period.Value = Parameters!PeriodA.Value,

        Fields!Amount_Custom_IS.Value,

        Nothing

      )

    Sum(

      IIf(

        Fields!Period.Value = Parameters!PeriodB.Value,

        Fields!Amount_Custom_IS.Value,

        Nothing

      )

    )

     

     

     

     

  • Shahid12523's avatar
    1 year ago

    - Don’t filter the dataset with parameters.
    - Use expressions inside the table to show values for each period:
    =Sum(IIF(Fields!Period.Value = Parameters!PeriodA.Value, Fields!Amount_Custom_IS.Value, Nothing))
    =Sum(IIF(Fields!Period.Value = Parameters!PeriodB.Value, Fields!Amount_Custom_IS.Value, Nothing))


    - For difference:
    =Sum(IIF(Fields!Period.Value = Parameters!PeriodB.Value, Fields!Amount_Custom_IS.Value, Nothing))
    -
    Sum(IIF(Fields!Period.Value = Parameters!PeriodA.Value, Fields!Amount_Custom_IS.Value, Nothing))


    This mimics disconnected slicers—clean, scoped, and works even with overlapping periods.