Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hey Guys,
I need help with the following formula:
Solved! Go to Solution.
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
2. Create measure.
Measure_today =
var _select=SELECTEDVALUE('Table 2'[Year])
return
IF(
_select = YEAR(TODAY()),
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Date]>=DATE(2020,1,1)&&'Table'[Date]<=TODAY()&&'Table'[afdeling] in {"BPM","Asfalt"})))
Measure_Month =
var _select=SELECTEDVALUE('Table 2'[Year])
return
IF(
_select = YEAR(TODAY()),
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Date]>=DATE(2020,1,1)&&'Table'[Date]<=EOMONTH(TODAY(),0)&&'Table'[afdeling] in {"BPM","Asfalt"})))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
2. Create measure.
Measure_today =
var _select=SELECTEDVALUE('Table 2'[Year])
return
IF(
_select = YEAR(TODAY()),
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Date]>=DATE(2020,1,1)&&'Table'[Date]<=TODAY()&&'Table'[afdeling] in {"BPM","Asfalt"})))
Measure_Month =
var _select=SELECTEDVALUE('Table 2'[Year])
return
IF(
_select = YEAR(TODAY()),
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Date]>=DATE(2020,1,1)&&'Table'[Date]<=EOMONTH(TODAY(),0)&&'Table'[afdeling] in {"BPM","Asfalt"})))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@Anonymous ,
New Measure =
var _fil = if( year(selectedvalue(Datum[Datum])), Year(Today()) , filter(Datum, Datum[Datum] <= Today()) ,filter(Datum, Datum[Datum] = selectedvalue(Datum[Datum])) )
return
calculate([Measure], _fil )
User | Count |
---|---|
11 | |
9 | |
6 | |
5 | |
4 |