The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a measure that calculates the closing cash balance for Calendar Weeks. I have used matrix visual which has input from the measure and columns selected from a table having calendar weeks. What I want to do is a closing the cash balance of the previous week is opening the cash balance for next week. How can I create a measure for it.
EG:
As shown here Closing Cash Balances for CW 8 to CW 18 are presented. Where Closing Cash Balance is a measure and columns (CW08_2021 to CW18_2021) come from a column in a table.
I want to calculate the opening cash balance measure which is the closing cash balance of the previous CW.
EG- Closing cash balance of CW 08 will be opening cash balance for CW 09.
How can this measure be calculated?
Hi @red_arrowhead ,
What's the calculation logic of closing cash balance? It will involve opening cash balance into calculation or not? Here are some links about calculating opening and closing balance, you can refer them. If they are not applicable for your scenario, please provide some sample data and expected result with sample or screenshots(exclude sensitive data). Thank you.
Best Regards
@red_arrowhead , you can not create previous column in power bi.
You have to create a rank on YYYYWW (Fin year and week) and sue that for last week.
new column
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format
measures example
This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
refer my blog for info
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
96 | |
75 | |
67 | |
52 | |
52 |