Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
How do i get the calculate sum formula to only display the sum into the currently month instead of all the months as shown? Example 56 should only be shown for current month row (Jan 2024) not all months. Thanks!
write this code :
new column =
var month = month ( today())
var year = year(today() )
var calc =
sumx(
filter (
all ( tbl_name[ values.1] , tbl_name[curernt .. cdc] ) ,
year (tbl_name[ values.1]) = year && month ( tbl_name[ values.1] ) = month
)
var current_row_month = month(tbl_name[ values.1])
var current_row_year = year(tbl_name[ values.1])
return
switch(
true() ,
current_row_month = month && current_row_year = year , calc )
let me know if it works out for you .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos 👍🫡
you can try to create a column
pls see the attachment below
Proud to be a Super User!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
103 | |
68 | |
47 | |
39 | |
37 |