Forum Discussion

Gurpreetsingh1's avatar
1 year ago
Solved

Power BI sales report

  Hi guys hopefully your are doing well.   I have a scenario please help  I have a data set current year sale 2024 in which I have reference date, old order, total order, actual sales, expe...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Gurpreetsingh1 ,

    The screenshot for the expected output is fuzzy, could you please provide it again?

     

    As checked the screenshots your provided, there is a common field Business Unit(BU) among these three tables. You can follow the steps below to get it:

    1. Create the measures as below to get the budget and last year sales

     

    Current Year Budget =
    VAR _bu =
        SELECTEDVALUE ( 'Sales data 2024'[Business Unit] )
    RETURN
        CALCULATE (
            SUM ( 'Budget 2024'[Total] ),
            FILTER ( 'Budget 2024', 'Budget 2024'[BU] = _bu )
        )
    Last Year sales =
    VAR _bu =
        SELECTEDVALUE ( 'Sales data 2024'[Business Unit] )
    RETURN
        CALCULATE (
            SUM ( 'LY 2023 sales'[Total] ),
            FILTER ( 'LY 2023 sales', 'LY 2023 sales'[BU] = _bu )
        )

     

    2. Create the table visual and put the fields of Sales data 2024 on it. Add the above measures onto the visual.

     

    Best Regards