Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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 )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 11 | |
| 9 | |
| 8 |