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.
My data sheets span from 2016 to 2022,I filter the data behind by the previous time period, such as 2016 to 2018,The table name is "ALLORDER",Measures below
_Result =
var tb1 = FILTER(VALUES(ALLORDER[magic]),[order_count_2016]+[order_count_2017]+[order_count_2018]<=20)
var tb2 = FILTER(tb1,[avg_profit_2016]>=0.4 || [avg_profit_2017]>=0.4 || [avg_profit_2018]>=0.4)
var tb3 = FILTER(ALLORDER,ALLORDER[magic] in tb2 && ALLORDER[date].[year]>2018)
return
calculate([_PROFIT],tb3)
[order_count_2016] = COUNTX(FILTER(ALLORDER,ALLORDER[date].[year]=2016),ALLORDER[profit])
[avg_profit_2016] =
var tmptable = FILTER(ALLORDER,ALLORDER[date].[year]=2016)
return
SUMX(tmptable,ALLORDER[profit])/COUNTX(tmptable,ALLORDER[profit])
The calculation turned out to be correct!
But put it on the visual table,use date column filter,it doesn't work.The other column works,like this
How can I fix this and be able to filter by date
Hi @RuyiLuo
Is your date column filtered to exclude 2016? As you can see from your measures that your measures are fixed-years, make sure that you include these fixed years in your year filter. and can you provide some sample data or pictures so that we can better advise you?
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I‘m sorry,I don't understand "make sure that you include these fixed years in your year filter" mean,The table is a trader order,like this,
the year filter is date hierarchy,
The other column can filter ,except date column
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |