Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Community,
I am new to Power BI and hence I'd need help with creating DAX Formulas.
I have two columns 1) Week (the date values are in 7 days interval) 2) Quantity
I would need the Minimum, Maximum and Average of Quantity based on the week column(Precisely past 6 weeks from the current week) - I will be using these aggregates on the Line values in a chart projecting over the weeks. My question is:
1) Do I create a Measure or a new column
2) DAX query or the syntax would be helpful.
Thanks 🙂
Hi @Anonymous
try a measures
Minimum = CALCULATE(MIN('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))
Maximum = CALCULATE(MAX('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))
Avg = CALCULATE(AVERAGE('Table'[Quantity]), ALLEXCEPT('Table', 'Table'[Week]))
where "Table' - your table name, [Week] - name of column with week
do not hesitate to give a kudo to useful posts and mark solutions as solution
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |