Forum Discussion
Power BI sales report
- Anonymous1 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
Sorry unable to upload pbix or table due to some reasons I have attached three sample data ss
1. Sales data 2024
2. Budget 2024
3. LY 2023 sales
- Anonymous1 year agoNot applicable
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