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.
Hello fantastic community,
I have a table like this:
Date | Biomass |
31/12/2023 | 10 |
31/01/2024 | 12 |
29/02/2024 | 14 |
As I only have one column of dates, I consider that the biomass at the end of the month is equal to the biomass on the first day of the following month.
Now I have one measure named Initial Biomass:
Initial Biomass =
VAR _day = MIN( 'Date'[Date] )
VAR _previous_day = _day - 1
Var _month_previous_day = MONTH( _previous_day )
Var _year_previous_day = YEAR( _previous_day )
VAR _ini_bio_SE_1=
CALCULATE(
SUM( 'Movimentos SE'[Biomass (kg)] ),
FILTER(
ALL( 'Date'),
'Date'[Month Number] = _month_previous_day &&
'Date'[Year] = _year_previous_day
)
)
And this is working fine, but now I only want to have the average of visible months, when no month is selected for example:
Nov 23 | Dec 23 | Jan 24 | Feb 24 | Mar 24 | Total | |
Initial Biomass | 15 | 18 | 10 | 12 | 14 | 13.8 |
The total should change depending on the visible months.
Any help would be highly appreciated!
Thank you,
Simao
You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.
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 |
---|---|
97 | |
95 | |
76 | |
72 | |
65 |
User | Count |
---|---|
140 | |
109 | |
103 | |
82 | |
73 |