Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi
this is my matrix and I only want to to show Yearly Avg Per Day on the year level.
I created two measures (see below), but both don't give the desired result. What am I doing wrong
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below.
Sales avg per year: =
VAR _currentyear =
MAX ( 'Calendar'[Year] )
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( 'Calendar'[Month] ), BLANK (),
ISINSCOPE ( 'Calendar'[Qtr] ), BLANK (),
ISINSCOPE ( 'Calendar'[Year] ),
AVERAGEX (
ADDCOLUMNS (
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = _currentyear ),
"@sales", CALCULATE ( SUM ( Data[Sales] ) )
),
[@sales]
)
)
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below.
Sales avg per year: =
VAR _currentyear =
MAX ( 'Calendar'[Year] )
RETURN
SWITCH (
TRUE (),
ISINSCOPE ( 'Calendar'[Month] ), BLANK (),
ISINSCOPE ( 'Calendar'[Qtr] ), BLANK (),
ISINSCOPE ( 'Calendar'[Year] ),
AVERAGEX (
ADDCOLUMNS (
FILTER ( ALL ( 'Calendar' ), 'Calendar'[Year] = _currentyear ),
"@sales", CALCULATE ( SUM ( Data[Sales] ) )
),
[@sales]
)
)
| User | Count |
|---|---|
| 57 | |
| 43 | |
| 32 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |