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.
Hey there
I have a table set below for Date, Company, In.
May I know how can I create 2 columns that:
- calculates cumulative balances of "In" but only for individual company A, B & C
- calculates cumulative balances of "In" but for all companies
Date | Company | In | Cumu Bal by Company | Cumu Bal by Combined |
2-Jan | A | 1 | 1 | 8 |
3-Jan | A | 1 | 2 | 11 |
2-Jan | B | 1 | 1 | 8 |
3-Jan | B | 2 | 3 | 11 |
4-Jan | B | 3 | 6 | 14 |
2-Jan | C | 2 | 2 | 8 |
2-Jan | C | 4 | 6 | 8 |
Solved! Go to Solution.
@Anonymous
you need to build this model and then add these measures:
Cumu Bal by Combined
=IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( 'Calendar' ) ), CALCULATE ( SUM ( Data[In] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ), ALL ( Companies ) ) )
Cumu Bal by Company
=IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( 'Calendar' ) ), CALCULATE ( SUM ( Data[In] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) ) )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
@Anonymous
you need to build this model and then add these measures:
Cumu Bal by Combined
=IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( 'Calendar' ) ), CALCULATE ( SUM ( Data[In] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ), ALL ( Companies ) ) )
Cumu Bal by Company
=IF ( MIN ( 'Calendar'[Date] ) <= CALCULATE ( MAX ( Data[Date] ), ALL ( 'Calendar' ) ), CALCULATE ( SUM ( Data[In] ), FILTER ( ALL ( 'Calendar'[Date] ), 'Calendar'[Date] <= MAX ( 'Calendar'[Date] ) ) ) )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |