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.
I am trying to insert a column for the budget less actual for each department. i've attached a mock up table to show how my spreadsheet is set up. I would like to know, for each department, what the runnign total is for budget less actual, or am option to suggestions for alternatives . I'm fairly new to BI as well...
Solved! Go to Solution.
Hi @joannerw
Agreed with amitchandak, you could create calculated columns as him suggested.
Monthsort = FORMAT([Month],"YYYY-MM")
You could also create measures if you want the final results to be dynamically with the slicers.
running budget =
CALCULATE (
SUM ( 'Table'[Budget] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
running actual =
CALCULATE (
SUM ( 'Table'[Actual] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
If "less" from "runnign total is for budget less actual" means "minus",
then you could create measures
running budget-actual =
CALCULATE (
SUM ( 'Table'[Budget] )-SUM('Table'[Actual]),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @joannerw
Agreed with amitchandak, you could create calculated columns as him suggested.
Monthsort = FORMAT([Month],"YYYY-MM")
You could also create measures if you want the final results to be dynamically with the slicers.
running budget =
CALCULATE (
SUM ( 'Table'[Budget] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
running actual =
CALCULATE (
SUM ( 'Table'[Actual] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
If "less" from "runnign total is for budget less actual" means "minus",
then you could create measures
running budget-actual =
CALCULATE (
SUM ( 'Table'[Budget] )-SUM('Table'[Actual]),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Dept]
= MAX ( 'Table'[Dept] )
&& 'Table'[Monthsort]
<= MAX ( 'Table'[Monthsort] )
)
)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this. I have not tested this. But you need to have month start or month-end date. Or Month in YYYYMM format so that is can be compared with last month
Cumm Budget =
Sumx(
filter('Table','Table'[Dept]=earlier('Table'[Dept]) && 'Table'[Month Date]<=earlier('Table'[Month Date])),'Table'[Budget])
Cumm Actual=
Sumx(
filter('Table','Table'[Dept]=earlier('Table'[Dept]) && 'Table'[Month Date]<=earlier('Table'[Month Date])),'Table'[Actual])
Month Sort = format(table[date],"YYYYMM")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |