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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi!
my table is like this
| Date | Customers |
| 29/1/2016 | 50 |
| 28/2/2016 | 70 |
I would like when i select the two dates to have 70 customers
if i select only february 70 customers again
if i select january 50 customers
(end of month in every selection)
Solved! Go to Solution.
Cool dude,
Measure = CALCULATE( SUM(Customers) , ENDOFMONTH(Date) )
try this,
Let me know if it is not helping u
this works for me:
lastdaycurrentmonth = DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-1
Cool dude,
Measure = CALCULATE( SUM(Customers) , ENDOFMONTH(Date) )
try this,
Let me know if it is not helping u
thanks!!
so calculate works like sumif in excel?
it sums the customers with an expression?
Yes u r correct .
new question relevant to my post @Baskar
i created a table with three values MTD QTD YTD
i put these values to a slicer
and i have this measure (previoustime)
IF(VALUES(YTDQTDMTD[Column1])="MTD";PREVIOUSMONTH('database'[date]);IF(VALUES(YTDQTDMTD[Column1])="QTD";PREVIOUSMONTH(STARTOFQUARTER('database'[date]));IF(VALUES(YTDQTDMTD[Column1])="YTD";PREVIOUSMONTH(STARTOFYEAR('database'[date]));"")))but when i creater another measure
CALCULATE(SUM('database[customers]);previoustime)it does not work... it says measure previous time is a true false statement
Yes u can't do like this dude.
because the calculate function is different.
CALCULATE(SUM('database[customers]);previoustime)Calculate ( Aggerication , Table ),
If u want to use Previoustime in calcylation it should return Table.
let me explain y u doing like this and hat u want exactly ? i will help u
No Need date table dude , u go with same date column which u have in your table .
That will work
yes got it!
ENDOFMONTH(PREVIOUSMONTH('database'[date]))my problem to make previous month work is that the end of every month in my original database is not 31/01/2016 it is 29/01/2016 (the last data date of every month)
how to have end of month for previous month 29/01/2016 and not 31/01/2016?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!