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.
https://docs.google.com/spreadsheets/d/1qnh07BRHlbXaGnLkgahf95uXpkDlXgUq5oKS866OMoo/edit?usp=sharing
Hi all,
Please help i have attached a link below for the excel sheet i need help with creating a measure that will calculate the columns that are highlighted in blue in the attached excel link
Thanks
Solved! Go to Solution.
Hi @Xirhandziwa,
You can try to use the following measure formulas to achieve your requirement:
mat 2021 =
VAR currDate =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[2020/2021] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] > currDate )
)
+ CALCULATE (
SUM ( 'Table'[2021/2022] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= currDate )
)
mat 2022 =
VAR currDate =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[2021/2022] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] > currDate )
)
+ CALCULATE (
SUM ( 'Table'[2022/2023] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= currDate )
)
diff = [mat 2022]-[mat 2021]
Regards,
Xiaoxin Sheng
Hi @Xirhandziwa,
You can try to use the following measure formulas to achieve your requirement:
mat 2021 =
VAR currDate =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[2020/2021] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] > currDate )
)
+ CALCULATE (
SUM ( 'Table'[2021/2022] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= currDate )
)
mat 2022 =
VAR currDate =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[2021/2022] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] > currDate )
)
+ CALCULATE (
SUM ( 'Table'[2022/2023] ),
FILTER ( ALLSELECTED ( 'Table' ), [Date] <= currDate )
)
diff = [mat 2022]-[mat 2021]
Regards,
Xiaoxin Sheng
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 |