Forum Discussion
Power BI Dax Measure
I have two columns in a line and clustered column chart which shows one with number of cases received in one week and the other shows number of cases resolved in the same week. For suppose in week 33 I have 29 cases received out of which 13 are resolved and balance 16 are moved to upcoming weeks . I want to show another bar in the same chart which shows the balance numbers are moved to in upcoming weeks. Please advise a measure
3 Replies
- Deepak_22Helper I
Hello Anonymous ,
The below measure calculates the balance by subtracting the sum of resolved cases from the sum of received cases, considering only the weeks up to the maximum week in your dataset.
Balance = CALCULATE( SUM('Cases'[Received]) - SUM('Cases'[Resolved]), FILTER( ALL('Cases'), 'Cases'[Week] <= MAX('Cases'[Week]) ) )If you find this helpful, please provide a kudo and mark it as an accepted solution.
- AnonymousNot applicable
Hi Deepak, I do not have receved and resolved as fields . However I have a measure which shows cases received this week and cases resolved this week.
- Deepak_22Helper I
Hello Anonymous , I understand that you have measures for "Cases Received This Week" and "Cases Resolved This Week." In that case, you can create the "Balance" measure as a calculated measure based on these measures.
Assuming you have the following measures:
Cases Received This Week as [ReceivedThisWeek]
Cases Resolved This Week as [ResolvedThisWeek]
You can create a new measure for the "Balance" as follows:
Balance = [ReceivedThisWeek] - [ResolvedThisWeek]If you find this helpful, please provide a kudo and mark it as an accepted solution.