Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have below sample reports budget and actual by mth and requrie to output report by quarter.
Appreciate any advice. Thanks.
Solved! Go to Solution.
Hi @Grace1 ,
Please check if this could meet your requirement:
1. Connect to Excel file.
In Power Query Editor,
2. Transform data of both Actual and Budget tables:
3. Merge queries as new.
4. Expand table.
5. Add conditional column.
6. Filter rows.
7. Remove column "Month.1" and "Month eq Month.1".
8. Rename column "Budget.1" with "Budget".
9. Add conditional column.
10. Change type of "MonthNum" column.
11. Close and Apply.
In Power BI Desktop,
12. Create a Calendar table.
Calendar =
ADDCOLUMNS (
CALENDAR ( DATE ( 2019, 1, 1 ), DATE ( 2019, 12, 31 ) ),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"Quarter", QUARTER ( [Date] )
)
13. Create relationship.
14. Create columns in Calendar table.
Q = SWITCH ( 'Calendar'[Quarter], 1, "1Q", 2, "2Q", 3, "3Q", 4, "4Q" )
Half Year = SWITCH('Calendar'[Quarter],1,"1H",2,"1H",3,"2H",4,"2H")
15. Create a Measure.
Banlance = SUM('Actual & Budget'[Actual])-SUM('Actual & Budget'[Budget])
16. Create a Matrix visual.
For more details, please check the attached PBIX file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Grace1 ,
Try to create a [MonthNum] column and then sort your [Month] column by it.
Reference:
Sort By Month Names In Power BI;
Power BI Tips: Sort by Month Name.
Best Regards,
Icey
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
96 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |