Forum Discussion
Anonymous
7 years agoNot applicable
DAX Average with filter
Hi! I want to make a new measure with an Average and a filter. There's my data: On Powerbi, I want a measure of an average from year 2018 and other measure with year 2019. Ho...
- 7 years ago
Hi Anonymous
Try creating these two measures and place them, for instance, in a card visual. Table1 is the table you show:
AVG_2018 = CALCULATE ( AVERAGE ( Table1[Quant] ), Table1[Year] = 2018 )
AVG_2019 = CALCULATE ( AVERAGE ( Table1[Quant] ), Table1[Year] = 2019 )
Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. That allows people trying to help to readily copy the data and run a quick test, plus it increases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here.
JCARRASCOA
3 years agoNew Member
thanks