The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a table that contains data on product, sales amount and date when a certain product has been purchased in such amount. Also filters are applied to this table: date slicer and product filter.
I need to calculate a column that will have an average value of all sales for a selected product and ONLY for the dates range that has been specified with a date slicer. So basically, the calculated column should contain the same value for every row(sales average for a chosen product and time period - specified by date slicer)
I am trying to calculate this column by using CALCULATE function
inside this function I am using function AVERAGE(Table[sales])
as another arguments to the CALCULATE function I am passing function ALLEXCEPT function where I specify columns for which filters are appled: product and dates.
Looks like I am doing something completely wrong as the calculated value in that column is static and is not being re-calculated every time i apply date slicer
Please advice
Thank you
Hi @Anonymous,
you are not doing anything wrong. Calculated columns are only refreshed when the entire table/data model is refreshed. Which means calculated columns don't get refreshed or updated when a user uses slicers in a report.
If you need dynamic behaviour, you have to create measures.
Cheers,
Sturla
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
20 | |
15 | |
14 | |
9 | |
7 |