Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there ;
i need your small help , i have a table as below i need to calculate with a measure only sum of the current month amount.
for below sample , we are in November so current month is November , in dates only two dates includes amount for current month . So i need to catch form sum = "150" result .
but dont forget pls the main thing when i open the report , system will compare the date of opening report and will find current month amount and ewill sum .I mean if today was one of the december's day and if i would open report today system must care the in below table December dates .
i hope it is clear , thanks in advance
Solved! Go to Solution.
Here is a measure expression that shows one way to do this. I assume you will use this in a card visual.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Month] ) = thismonth
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Here is a measure expression that shows one way to do this. I assume you will use this in a card visual.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Month] ) = thismonth
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat thank you but , in my dable there is no month column, but in your formula seems "MONTH ( TableA [Month] ) " , i am working on a live connect so i can not create column about month
That was a typo. It is not the Month but the Date column again. No Month column required.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Date] ) = thismonth
)
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |