Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I would like to ask how to make a measure which calculates sum according to the end date of slicer. I mean when we turn left or turn right this:
I have used this expression but it didn't help me
Solved! Go to Solution.
Hi, @Analitika
You should use all tables and save 'maxdate' as a variable first, otherwise it will be affected.
Try like this:
maxdatetotalvalue =
VAR maxdate =
MAXX ( ALLSELECTED ( 'Table1' ), [Date] )
RETURN
SUMX ( FILTER ( ALL ( 'Table1' ), [Date] = maxdate ), [Value] )
Below is my sample and two wrong results for reference.
Hi, @Analitika
You should use all tables and save 'maxdate' as a variable first, otherwise it will be affected.
Try like this:
maxdatetotalvalue =
VAR maxdate =
MAXX ( ALLSELECTED ( 'Table1' ), [Date] )
RETURN
SUMX ( FILTER ( ALL ( 'Table1' ), [Date] = maxdate ), [Value] )
Below is my sample and two wrong results for reference.
Hi @Analitika ,
I can more specifically if you could share sample data in text format with expected output.
But you can try below code:-
measure =
VAR _start_date =
MIN ( date[date] )
VAR _end_date =
MAX ( date[date] )
RETURN
CALCULATE (
SUM ( table[column] ),
table[date] >= _start_date
&& table[date] <= _end_date
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
But it didn't work.
Here is my formula.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
38 | |
29 | |
28 |
User | Count |
---|---|
99 | |
88 | |
62 | |
42 | |
39 |